Parcourir la source

Ensure that wifi interface is set in config file

Bob Mottram il y a 8 ans
Parent
révision
dfd4573ddc
2 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 2
    0
      src/freedombone-utils-wifi
  2. 4
    0
      src/freedombone-wifi

+ 2
- 0
src/freedombone-utils-wifi Voir le fichier

371
     update_wifi_adaptors
371
     update_wifi_adaptors
372
     if [ ! $IFACE ]; then
372
     if [ ! $IFACE ]; then
373
         # Don't try to configure wifi if there are no adaptors
373
         # Don't try to configure wifi if there are no adaptors
374
+        remove_config_param "WIFI_INTERFACE"
374
         return
375
         return
375
     fi
376
     fi
377
+    write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
376
 
378
 
377
     if [ -f $WIFI_NETWORKS_FILE ]; then
379
     if [ -f $WIFI_NETWORKS_FILE ]; then
378
         rm $WIFI_NETWORKS_FILE
380
         rm $WIFI_NETWORKS_FILE

+ 4
- 0
src/freedombone-wifi Voir le fichier

50
 IFACE=
50
 IFACE=
51
 IFACE_SECONDARY=
51
 IFACE_SECONDARY=
52
 
52
 
53
+source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-config
53
 source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
54
 source /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-wifi
54
 
55
 
55
 function show_help {
56
 function show_help {
83
             shift
84
             shift
84
             WIFI_INTERFACE=${1}
85
             WIFI_INTERFACE=${1}
85
             wifi_interface_specified=1
86
             wifi_interface_specified=1
87
+            write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
86
             ;;
88
             ;;
87
         -t|--type)
89
         -t|--type)
88
             shift
90
             shift
137
         exit 872356
139
         exit 872356
138
     fi
140
     fi
139
     WIFI_INTERFACE=$IFACE
141
     WIFI_INTERFACE=$IFACE
142
+    write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
140
 fi
143
 fi
141
 
144
 
142
 if [ $WIFI_DISABLE ]; then
145
 if [ $WIFI_DISABLE ]; then
143
     disable_wifi $WIFI_DISABLE
146
     disable_wifi $WIFI_DISABLE
147
+    remove_config_param "WIFI_INTERFACE"
144
     exit 0
148
     exit 0
145
 fi
149
 fi
146
 
150