Skip to content

Instantly share code, notes, and snippets.

@XIIIVI
Last active June 22, 2020 11:15
Show Gist options
  • Save XIIIVI/7f9e098d2e815e1f05c376ecdee45214 to your computer and use it in GitHub Desktop.
Save XIIIVI/7f9e098d2e815e1f05c376ecdee45214 to your computer and use it in GitHub Desktop.
# Patch the script 20-networking.sh as there is an issue due to the use of /etc
sudo sed -i 's#\" \> /etc/wpa_supplicant#\" \> \$\{ETC_DIR\}/wpa_supplicant#g' ./bootstrap.d/20-networking.sh
# The condition is wrong
sudo sed -i 's/if \[ -z \"\$NET_WIFI_SSID\" \] \&\& \[ -z \"\$NET_WIFI_PSK\" \] \; then/if \[ \! -z \"\$NET_WIFI_SSID\" \] \&\& \[ \! -z \"\$NET_WIFI_PSK\" \] \; then/g' ./bootstrap.d/20-networking.sh
# The variables are not the right ones
sudo sed -i "s#NET_SSID#NET_WIFI_SSID#g" ./bootstrap.d/20-networking.sh
sudo sed -i "s#NET_WPAPSK#NET_WIFI_PSK#g" ./bootstrap.d/20-networking.sh
cat ./bootstrap.d/20-networking.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment