* [PR PATCH] adding shebang to avoid error in non POSIX shell
@ 2021-12-01 17:10 ayoubelmhamdi
2021-12-01 17:15 ` Duncaen
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: ayoubelmhamdi @ 2021-12-01 17:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
There is a new pull request by ayoubelmhamdi against master on the void-packages repository
https://github.com/ayoubelmhamdi/void-packages patch-1
https://github.com/void-linux/void-packages/pull/34335
adding shebang to avoid error in non POSIX shell
```shell
$ for f in /etc/wpa_supplicant/wpa_supplicant-*.conf /etc/wpa_supplicant-*.conf ;do echo $i;done
```
not working in zsh for example
also when I try to install void-linux by wifi from scratch , wpa_supplicant cant connect to wifi with `void-installer` I must connect manually by ,
A patch file from https://github.com/void-linux/void-packages/pull/34335.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-1-34335.patch --]
[-- Type: text/x-diff, Size: 873 bytes --]
From 1fa97c9052e9f1dba4e235c8515e17cd69a1ad4f Mon Sep 17 00:00:00 2001
From: AYOUB EL MHAMDI <34358145+ayoubelmhamdi@users.noreply.github.com>
Date: Wed, 1 Dec 2021 18:07:14 +0100
Subject: [PATCH] add shebang to avoid error in non POSIX shell
for f in /etc/wpa_supplicant/wpa_supplicant-*.conf /etc/wpa_supplicant-*.conf
not work in zsh for example
---
srcpkgs/wpa_supplicant/files/wpa_supplicant/auto | 1 +
1 file changed, 1 insertion(+)
diff --git a/srcpkgs/wpa_supplicant/files/wpa_supplicant/auto b/srcpkgs/wpa_supplicant/files/wpa_supplicant/auto
index ce7774b4eb6a..97feaaa01e39 100644
--- a/srcpkgs/wpa_supplicant/files/wpa_supplicant/auto
+++ b/srcpkgs/wpa_supplicant/files/wpa_supplicant/auto
@@ -1,3 +1,4 @@
+#!/bin/sh
# find interface from wpa_supplicant-*.conf files
for f in /etc/wpa_supplicant/wpa_supplicant-*.conf \
/etc/wpa_supplicant-*.conf; do
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
@ 2021-12-01 17:15 ` Duncaen
2021-12-01 19:48 ` abenson
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Duncaen @ 2021-12-01 17:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-983854628
Comment:
Its sourced, not executed, so this has no effect at all.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
2021-12-01 17:15 ` Duncaen
@ 2021-12-01 19:48 ` abenson
2021-12-01 22:13 ` Chocimier
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: abenson @ 2021-12-01 19:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-983999004
Comment:
Your snippet works fine in `zsh` if you fix it. Note the echo `$i` doesn't match the `for f`. `$i` isn't set to anything there.
try: `for f in /etc/wpa_supplicant/wpa_supplicant-*.conf /etc/wpa_supplicant-*.conf; do echo $f; done`
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
2021-12-01 17:15 ` Duncaen
2021-12-01 19:48 ` abenson
@ 2021-12-01 22:13 ` Chocimier
2021-12-03 0:40 ` ayoubelmhamdi
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Chocimier @ 2021-12-01 22:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-984101089
Comment:
How did you manage to run that file with zsh? It's not `sv up wpa_supplicant`, not `/etc/sv/wpa_supplicant/run` (incorrect, btw), not `sh /etc/sv/wpa_supplicant/run` (incorrect, btw), not preceding any of that with `chsh -s /bin/zsh`, not even linking sh to zsh (incorrect, btw), all of that would still run with posix semantics.
Are you doing something like `source /etc/sv/wpa_supplicant/run` from zsh?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
` (2 preceding siblings ...)
2021-12-01 22:13 ` Chocimier
@ 2021-12-03 0:40 ` ayoubelmhamdi
2021-12-03 1:14 ` ayoubelmhamdi
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ayoubelmhamdi @ 2021-12-03 0:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 211 bytes --]
New comment by ayoubelmhamdi on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-985116953
Comment:
> source /etc/sv/wpa_supplicant/run
it's kill my terminal
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
` (3 preceding siblings ...)
2021-12-03 0:40 ` ayoubelmhamdi
@ 2021-12-03 1:14 ` ayoubelmhamdi
2021-12-03 18:35 ` ericonr
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ayoubelmhamdi @ 2021-12-03 1:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
New comment by ayoubelmhamdi on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-985131875
Comment:
- i think `wpa_supplicant` work fine in `zsh` too
### but:
- why i get this error in `void-installer`
![IMG_20211203_020651_5](https://user-images.githubusercontent.com/34358145/144527801-ac755e04-ff05-47a7-bef1-45996d9056d1.jpg)
- also in tty8 , is no input here
![IMG_20211203_020713_0](https://user-images.githubusercontent.com/34358145/144527910-71b90559-d810-4cec-a82e-d7138fdd23d8.jpg)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
` (4 preceding siblings ...)
2021-12-03 1:14 ` ayoubelmhamdi
@ 2021-12-03 18:35 ` ericonr
2021-12-03 18:47 ` ericonr
2021-12-03 18:47 ` [PR PATCH] [Closed]: " ericonr
7 siblings, 0 replies; 9+ messages in thread
From: ericonr @ 2021-12-03 18:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-985741053
Comment:
> it's kill my terminal
As expected: the script ends with an `exec` command.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
` (5 preceding siblings ...)
2021-12-03 18:35 ` ericonr
@ 2021-12-03 18:47 ` ericonr
2021-12-03 18:47 ` [PR PATCH] [Closed]: " ericonr
7 siblings, 0 replies; 9+ messages in thread
From: ericonr @ 2021-12-03 18:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/34335#issuecomment-985748320
Comment:
https://github.com/void-linux/void-mklive/issues/5 `void-mklive` doesn't use zsh for anything.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PR PATCH] [Closed]: adding shebang to avoid error in non POSIX shell
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
` (6 preceding siblings ...)
2021-12-03 18:47 ` ericonr
@ 2021-12-03 18:47 ` ericonr
7 siblings, 0 replies; 9+ messages in thread
From: ericonr @ 2021-12-03 18:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
There's a closed pull request on the void-packages repository
adding shebang to avoid error in non POSIX shell
https://github.com/void-linux/void-packages/pull/34335
Description:
# UPDATE
```shell
$ for f in /etc/wpa_supplicant/wpa_supplicant-*.conf /etc/wpa_supplicant-*.conf ;do echo $i;done
zsh: no matches found: /etc/wpa_supplicant-*.conf
```
not working in zsh for example
also when I try to install void-linux by wifi from scratch , wpa_supplicant cant connect to wifi with `void-installer` I must connect manually by ,
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-03 18:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 17:10 [PR PATCH] adding shebang to avoid error in non POSIX shell ayoubelmhamdi
2021-12-01 17:15 ` Duncaen
2021-12-01 19:48 ` abenson
2021-12-01 22:13 ` Chocimier
2021-12-03 0:40 ` ayoubelmhamdi
2021-12-03 1:14 ` ayoubelmhamdi
2021-12-03 18:35 ` ericonr
2021-12-03 18:47 ` ericonr
2021-12-03 18:47 ` [PR PATCH] [Closed]: " ericonr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).