warn if no password

This commit is contained in:
garywill 2018-08-31 18:41:06 +08:00 committed by garywill
parent c75dde77d8
commit 47e8e80618
1 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ SCRIPT_UMASK=0077
umask $SCRIPT_UMASK umask $SCRIPT_UMASK
usage() { usage() {
echo "Usage: "$PROGNAME" [options] <wifi-interface> [<access-point-name> [<passphrase>]]" echo "Usage: "$PROGNAME" [options] <wifi-interface> <access-point-name> [<passphrase>]"
echo echo
echo "Options:" echo "Options:"
echo " -h, --help Show this help" echo " -h, --help Show this help"
@ -76,7 +76,6 @@ usage() {
echo "Useful informations:" echo "Useful informations:"
echo " * If you're not using the --no-virt option, then you can create an AP with the same" echo " * If you're not using the --no-virt option, then you can create an AP with the same"
echo " interface you are getting your Internet connection." echo " interface you are getting your Internet connection."
echo " * You can pass your SSID and password through pipe or through arguments (see examples)."
echo echo
echo "Examples:" echo "Examples:"
echo " "$PROGNAME" wlan0 MyAccessPoint MyPassPhrase" echo " "$PROGNAME" wlan0 MyAccessPoint MyPassPhrase"
@ -1404,6 +1403,8 @@ wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP rsn_pairwise=CCMP
EOF EOF
else
echo "Warning: Wifi is not protected by password" >&2
fi fi
if [[ $NO_DNSMASQ -eq 0 ]]; then if [[ $NO_DNSMASQ -eq 0 ]]; then