1
0
forked from finn/tinyboard

add WiFi password extraction validation in setup-network.sh

This commit is contained in:
Justin Oros
2026-04-16 13:13:18 -07:00
parent 119b747dda
commit ae49c58b13

View File

@@ -114,6 +114,7 @@ if $IS_WIFI; then
else
WIFI_SSID="$CURRENT_SSID"
WIFI_PASS=$(grep -A2 "\"${WIFI_SSID}\"" "$NETPLAN_FILE" 2>/dev/null | grep password | awk -F': ' '{print $2}' | tr -d '"' || true)
[ -n "$WIFI_PASS" ] || die "Could not extract WiFi password from existing config — please re-enter credentials."
fi
fi