DEVICE=${NETDEVICES[$DV]}
device2props
DV=$DEVICENAME
+ ifdown $DV
+ sleep 3
# wireless config
WLDEVICE="$(LANG=C LC_MESSAGEWS=C iwconfig $DV 2>/dev/null | awk '/802\.11|READY|ESSID/{print $1}')"
WLDEVICECOUNT="$(LANG=C LC_MESSAGEWS=C iwconfig $DV 2>/dev/null | wc -l)"
}
}
' /etc/network/interfaces)
- $DIALOG --inputbox "$MESSAGEW23 $ESSID" 15 50 "$WPASECRET" 2>"$TMP" || bailout 1
+ while [ -z "$WPASECRET" ] ; do
+ $DIALOG --inputbox "$MESSAGEW23 $ESSID" 15 50 "$WPASECRET" 2>"$TMP" || bailout 1
+ read WPASECRET <"$TMP"
+ if [ -z "$WPASECRET" ] ; then
+ $DIALOG --msgbox "Sorry, empty password not allowed, please retry." 0 0 || bailout 1
+ fi
+ done
# make sure backslashes inside passphrase are handled correct
WPASECRET=$(sed -e 's/\\/\\/g' "$TMP") && rm -r "$TMP"
IFACEDONE=""
while [ -n "$DV" -a -z "$IFACEDONE" ]; do
configiface
- ifdown $DV
- sleep 3
if ! ifup $DV; then
$DIALOG --yesno "$MESSAGE14" 15 50 || IFACEDONE="DONE"
else