Skip to content
Snippets Groups Projects
Commit dfd4573d authored by Bob Mottram's avatar Bob Mottram
Browse files

Ensure that wifi interface is set in config file

parent 0c569eff
No related branches found
No related tags found
No related merge requests found
......@@ -371,8 +371,10 @@ function create_networks_interactive {
update_wifi_adaptors
if [ ! $IFACE ]; then
# Don't try to configure wifi if there are no adaptors
remove_config_param "WIFI_INTERFACE"
return
fi
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
if [ -f $WIFI_NETWORKS_FILE ]; then
rm $WIFI_NETWORKS_FILE
......
......@@ -50,6 +50,7 @@ WIFI_DISABLE=
IFACE=
IFACE_SECONDARY=
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-config
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
function show_help {
......@@ -83,6 +84,7 @@ do
shift
WIFI_INTERFACE=${1}
wifi_interface_specified=1
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
;;
-t|--type)
shift
......@@ -137,10 +139,12 @@ if [ ! $wifi_interface_specified= ]; then
exit 872356
fi
WIFI_INTERFACE=$IFACE
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
fi
if [ $WIFI_DISABLE ]; then
disable_wifi $WIFI_DISABLE
remove_config_param "WIFI_INTERFACE"
exit 0
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment