Ensure that wifi interface is set in config file
This commit is contained in:
parent
0c569eff66
commit
dfd4573ddc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue