Browse Source

wifi interface up after networks

Bob Mottram 8 years ago
parent
commit
8d5d3ba292
2 changed files with 6 additions and 1 deletions
  1. 3
    0
      src/freedombone-utils-wifi
  2. 3
    1
      src/freedombone-wifi

+ 3
- 0
src/freedombone-utils-wifi View File

70
     cd $curr_dir
70
     cd $curr_dir
71
     update_wifi_adaptors
71
     update_wifi_adaptors
72
     if [ $IFACE ]; then
72
     if [ $IFACE ]; then
73
+        wpa_action ${IFACE} stop
73
         wpa_cli -i ${IFACE} terminate
74
         wpa_cli -i ${IFACE} terminate
74
         ifconfig $IFACE up
75
         ifconfig $IFACE up
75
     fi
76
     fi
207
         echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
208
         echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
208
     fi
209
     fi
209
 
210
 
211
+    wpa_action ${WIFI_INTERFACE} stop
210
     wpa_cli -i ${WIFI_INTERFACE} terminate
212
     wpa_cli -i ${WIFI_INTERFACE} terminate
211
     systemctl restart network-manager
213
     systemctl restart network-manager
212
 }
214
 }
494
         echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
496
         echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
495
         echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
497
         echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
496
         systemctl restart network-manager
498
         systemctl restart network-manager
499
+        wpa_action ${WIFI_INTERFACE} stop
497
         wpa_cli -i ${WIFI_INTERFACE} terminate
500
         wpa_cli -i ${WIFI_INTERFACE} terminate
498
     else
501
     else
499
         networks_from_file
502
         networks_from_file

+ 3
- 1
src/freedombone-wifi View File

133
 fi
133
 fi
134
 
134
 
135
 if [ ! ${wifi_interface_specified} ]; then
135
 if [ ! ${wifi_interface_specified} ]; then
136
+    wpa_action ${WIFI_INTERFACE} stop
136
     wpa_cli -i ${WIFI_INTERFACE} terminate
137
     wpa_cli -i ${WIFI_INTERFACE} terminate
137
     update_wifi_adaptors
138
     update_wifi_adaptors
138
     if [ ! $IFACE ]; then
139
     if [ ! $IFACE ]; then
142
     WIFI_INTERFACE=${IFACE}
143
     WIFI_INTERFACE=${IFACE}
143
     echo "Adaptor: $WIFI_INTERFACE"
144
     echo "Adaptor: $WIFI_INTERFACE"
144
     write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
145
     write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
145
-    ifconfig ${WIFI_INTERFACE} up
146
 fi
146
 fi
147
 
147
 
148
 if [ ${WIFI_DISABLE} ]; then
148
 if [ ${WIFI_DISABLE} ]; then
153
 
153
 
154
 if [ -f ${WIFI_NETWORKS_FILE} ]; then
154
 if [ -f ${WIFI_NETWORKS_FILE} ]; then
155
     networks_from_file
155
     networks_from_file
156
+    ifconfig ${WIFI_INTERFACE} up
157
+    wpa_cli status
156
     exit 0
158
     exit 0
157
 fi
159
 fi
158
 
160