projects
/
grml-network.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not allow empty WPA passphrase.
[grml-network.git]
/
sbin
/
netcardconfig
diff --git
a/sbin/netcardconfig
b/sbin/netcardconfig
index
40252b7
..
0b2d89e
100755
(executable)
--- a/
sbin/netcardconfig
+++ b/
sbin/netcardconfig
@@
-325,7
+325,12
@@
configiface() {
}
}
' /etc/network/interfaces)
}
}
' /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
+ 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"
# make sure backslashes inside passphrase are handled correct
WPASECRET=$(sed -e 's/\\/\\/g' "$TMP") && rm -r "$TMP"