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
|
update_wifi_adaptors
|
||||||
if [ ! $IFACE ]; then
|
if [ ! $IFACE ]; then
|
||||||
# Don't try to configure wifi if there are no adaptors
|
# Don't try to configure wifi if there are no adaptors
|
||||||
|
remove_config_param "WIFI_INTERFACE"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
|
||||||
|
|
||||||
if [ -f $WIFI_NETWORKS_FILE ]; then
|
if [ -f $WIFI_NETWORKS_FILE ]; then
|
||||||
rm $WIFI_NETWORKS_FILE
|
rm $WIFI_NETWORKS_FILE
|
||||||
|
|
|
@ -50,6 +50,7 @@ WIFI_DISABLE=
|
||||||
IFACE=
|
IFACE=
|
||||||
IFACE_SECONDARY=
|
IFACE_SECONDARY=
|
||||||
|
|
||||||
|
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-config
|
||||||
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
|
source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
|
||||||
|
|
||||||
function show_help {
|
function show_help {
|
||||||
|
@ -83,6 +84,7 @@ do
|
||||||
shift
|
shift
|
||||||
WIFI_INTERFACE=${1}
|
WIFI_INTERFACE=${1}
|
||||||
wifi_interface_specified=1
|
wifi_interface_specified=1
|
||||||
|
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
|
||||||
;;
|
;;
|
||||||
-t|--type)
|
-t|--type)
|
||||||
shift
|
shift
|
||||||
|
@ -137,10 +139,12 @@ if [ ! $wifi_interface_specified= ]; then
|
||||||
exit 872356
|
exit 872356
|
||||||
fi
|
fi
|
||||||
WIFI_INTERFACE=$IFACE
|
WIFI_INTERFACE=$IFACE
|
||||||
|
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $WIFI_DISABLE ]; then
|
if [ $WIFI_DISABLE ]; then
|
||||||
disable_wifi $WIFI_DISABLE
|
disable_wifi $WIFI_DISABLE
|
||||||
|
remove_config_param "WIFI_INTERFACE"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue