Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding shebang to avoid error in non POSIX shell #34335

Closed
wants to merge 1 commit into from

Conversation

ayoubelmhamdi
Copy link

@ayoubelmhamdi ayoubelmhamdi commented Dec 1, 2021

UPDATE

$ 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 ,

for f in /etc/wpa_supplicant/wpa_supplicant-*.conf /etc/wpa_supplicant-*.conf 
not work in zsh for example
@Duncaen
Copy link
Member

Duncaen commented Dec 1, 2021

Its sourced, not executed, so this has no effect at all.

@abenson
Copy link
Contributor

abenson commented Dec 1, 2021

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

@Chocimier
Copy link
Member

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?

@ayoubelmhamdi
Copy link
Author

source /etc/sv/wpa_supplicant/run

it's kill my terminal

@ayoubelmhamdi
Copy link
Author

  • i think wpa_supplicant work fine in zsh too

but:

  • why i get this error in void-installer
    IMG_20211203_020651_5
  • also in tty8 , is no input here

IMG_20211203_020713_0

@ericonr
Copy link
Member

ericonr commented Dec 3, 2021

it's kill my terminal

As expected: the script ends with an exec command.

@ericonr
Copy link
Member

ericonr commented Dec 3, 2021

void-linux/void-mklive#5 void-mklive doesn't use zsh for anything.

@ericonr ericonr closed this Dec 3, 2021
@ayoubelmhamdi ayoubelmhamdi deleted the patch-1 branch December 3, 2021 19:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants