wifi-connect icon indicating copy to clipboard operation
wifi-connect copied to clipboard

Script hangs after "Internet connectivity established" during install

Open charliesneath opened this issue 5 years ago • 5 comments

When installing on an RPi0W, the script seems to hang when it gets to this line that outputs Internet connectivity established. This means that the following commands won't run.

If I'm installing wifi-connect within another script (using commands from @majorz's guidance here), should commands after this line run?

charliesneath avatar Feb 05 '19 04:02 charliesneath

Are you talking about the nohup script I provided you in the other link?

majorz avatar Feb 07 '19 09:02 majorz

@majorz yes, that’s the one—is this expected behavior?

charliesneath avatar Feb 07 '19 13:02 charliesneath

Not sure why it does not exit. I do not think I will be able to look it up soon, but if you find out the reason, please let me know.

majorz avatar Feb 07 '19 13:02 majorz

@majorz Could this be happening because I'm running the install script is run with nohup?

For reference, I'm using the following:

nohup bash ./install-wifi-connect.sh & tail -F nohup.out

Here's the contents of install-wifi-connect.sh:

#!/bin/bash

bash <(curl -L https://github.com/balena-io/wifi-connect/raw/master/scripts/raspbian-install.sh) -- -y
sudo wifi-connect

charliesneath avatar Feb 17 '19 17:02 charliesneath

@charliesneath It seems like are right about nohup causing the shell to hang when executed via SSH (source).

However, redirecting stdout, stderr, and stdin worked for me. Here's the command I ran while SSH'd in on my raspberry pi zero:

nohup ./install-wifi-connect.sh > foo.out 2> foo.err < /dev/null &

(Where the contents of my install-wifi-connect script are the same as yours.)


Curiously, it wouldn't work though when I ran it from my local machine like this:

ssh [email protected] "nohup ./install-wifi-connect.sh > foo.out 2> foo.err < /dev/null &"

e13h avatar Apr 23 '22 22:04 e13h