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

+ 3
- 1
src/freedombone-wifi View File

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