nodown option on wifi

This commit is contained in:
Bob Mottram 2016-10-22 16:04:40 +01:00
parent 6dea0a87ff
commit 52bf02acb2
1 changed files with 9 additions and 2 deletions

View File

@ -46,6 +46,7 @@ WIFI_CONFIG=/etc/wpa_supplicant/wpa_supplicant.conf
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
NETWORKS_INTERACTIVE=
WIFI_DISABLE=
NODOWN=
IFACE=
IFACE_SECONDARY=
@ -86,6 +87,10 @@ do
wifi_interface_specified=1
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
;;
--nodown)
shift
NODOWN=1
;;
-t|--type)
shift
WIFI_TYPE=${1}
@ -133,8 +138,10 @@ if [ ${NETWORKS_INTERACTIVE} ]; then
fi
if [ ! ${wifi_interface_specified} ]; then
wpa_action ${WIFI_INTERFACE} stop
wpa_cli -i ${WIFI_INTERFACE} terminate
if [ ! $NODOWN ]; then
wpa_action ${WIFI_INTERFACE} stop
wpa_cli -i ${WIFI_INTERFACE} terminate
fi
update_wifi_adaptors
if [ ! $IFACE ]; then
echo $'No wifi adaptors were found'