Celeb Glow
updates | April 02, 2026

"Network is unreachable" error for bash script at startup

I have a bash script that is run at startup on an Odroid running Ubuntu Mate. The script connects to the wifi and then calls a python script which makes a http request:

...
nmcli dev connect NETWORKNAME password PASSWD
python my_script.py
...

This script works when I call it after boot. However, when it is called during boot, the "Network is unreachable" error is thrown. I tried to use the ethernet connection but the result is the same. Also, adding a sleep 30 command before calling the python script doesn't work. How can I solve this problem?

1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy