lukicdarkoo/rpi-wifi

NO_INTERNET flag is undefined

Closed this issue · 0 comments

Regarding this line:

$([ "$NO_INTERNET" != "true" ] && echo "sudo sysctl -w net.ipv4.ip_forward=1")

Running the script throws an error when running without defining -n due to NO_INTERNET being unset, causing it to not evaluate, and the && isn't run.

A quick hacky alternative would be:
[ "x${NO_INTERNET}" = "xtrue" ]
As this way, even if NO_INTERNET is unset/undefined, the statement can still evaluate.