forked from finn/tinyboard
setup-spoke.sh: fix port scan range and user@host sed regex, offboard/onboard-spoke.sh: fix registry grep-v empty-output clobber, setup-network.sh: fix wifi password colon handling
This commit is contained in:
@@ -116,7 +116,7 @@ if $IS_WIFI; then
|
||||
[ -n "$WIFI_PASS" ] || die "Password cannot be empty"
|
||||
else
|
||||
WIFI_SSID="$CURRENT_SSID"
|
||||
WIFI_PASS=$(grep -FA2 "\"${WIFI_SSID}\"" "$NETPLAN_FILE" 2>/dev/null | grep password | awk -F': ' '{print $2}' | tr -d '"' || true)
|
||||
WIFI_PASS=$(grep -FA2 "\"${WIFI_SSID}\"" "$NETPLAN_FILE" 2>/dev/null | grep -F "password" | sed 's/^[^:]*: *//' | tr -d '"' || true)
|
||||
[ -n "$WIFI_PASS" ] || die "Could not extract WiFi password from existing config — please re-enter credentials."
|
||||
fi
|
||||
fi
|
||||
@@ -182,7 +182,7 @@ for i in $(seq 1 6); do
|
||||
warn "Network check $i/6 failed, retrying..."
|
||||
done
|
||||
|
||||
if $CONNECTED; then
|
||||
if [ "$CONNECTED" = "true" ]; then
|
||||
info "Network connectivity confirmed — config applied permanently."
|
||||
else
|
||||
warn "No network connectivity detected after 30 seconds — reverting to backup config."
|
||||
|
||||
Reference in New Issue
Block a user