summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-03-12 10:35:55 +0200
committerMaxim Devaev <[email protected]>2024-03-12 10:35:55 +0200
commit286c3a8caa690e5f5ac20e81ed202eeccd02b444 (patch)
treeed7a76fbc0afd948fe96feb975adeab6a3391702
parent2bebbd93196101ef47e2901e6f334119f02681e1 (diff)
bootconfig: supported hidden ssids
-rwxr-xr-xscripts/kvmd-bootconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/kvmd-bootconfig b/scripts/kvmd-bootconfig
index 03e20a2d..4795562f 100755
--- a/scripts/kvmd-bootconfig
+++ b/scripts/kvmd-bootconfig
@@ -202,6 +202,9 @@ if [ -n "$WIFI_ESSID" ]; then
fi
wpa_passphrase "$WIFI_ESSID" "$WIFI_PASSWD" > "/etc/wpa_supplicant/wpa_supplicant-$WIFI_IFACE.conf"
chmod 640 "/etc/wpa_supplicant/wpa_supplicant-$WIFI_IFACE.conf"
+ if [ -n "$WIFI_HIDDEN" ]; then
+ sed -i -e 's/^}/\tscan_ssid=1\n}/g' "/etc/wpa_supplicant/wpa_supplicant-$WIFI_IFACE.conf"
+ fi
systemctl enable "wpa_supplicant@$WIFI_IFACE.service" || true
touch /boot/pikvm-reboot.txt
fi