Browse Source

wifi up commands

Bob Mottram 7 years ago
parent
commit
0789dc350b
1 changed files with 10 additions and 5 deletions
  1. 10
    5
      src/freedombone-utils-wifi

+ 10
- 5
src/freedombone-utils-wifi View File

@@ -111,7 +111,8 @@ function setup_wifi_atheros {
111 111
     if [ $IFACE ]; then
112 112
         wpa_action ${IFACE} stop
113 113
         wpa_cli -i ${IFACE} terminate
114
-        ifconfig $IFACE up
114
+        #ifconfig $IFACE up
115
+        ifup $IFACE
115 116
     fi
116 117
 }
117 118
 
@@ -316,7 +317,8 @@ function hotspot_on {
316 317
     echo "    bridge_ports $WIFI_INTERFACE eth0" >> /etc/network/interfaces
317 318
 
318 319
     systemctl restart network-manager
319
-    ifconfig $WIFI_INTERFACE up
320
+    #ifconfig $WIFI_INTERFACE up
321
+    ifup $WIFI_INTERFACE
320 322
     systemctl restart hostapd
321 323
 }
322 324
 
@@ -357,7 +359,8 @@ function wifi_wpa2_psk {
357 359
     wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
358 360
 
359 361
     systemctl restart network-manager
360
-    ifconfig ${WIFI_INTERFACE} up
362
+    #ifconfig ${WIFI_INTERFACE} up
363
+    ifup $WIFI_INTERFACE
361 364
 }
362 365
 
363 366
 function wifi_none {
@@ -391,7 +394,8 @@ function wifi_none {
391 394
     echo '}' >> $WIFI_CONFIG
392 395
 
393 396
     systemctl restart network-manager
394
-    ifconfig ${WIFI_INTERFACE} up
397
+    #ifconfig ${WIFI_INTERFACE} up
398
+    ifup $WIFI_INTERFACE
395 399
 }
396 400
 
397 401
 function networks_from_file {
@@ -465,7 +469,8 @@ function networks_from_file {
465 469
     resolvconf=/var/run/NetworkManager/resolv.conf
466 470
     chattr -i $resolvconf
467 471
     systemctl restart network-manager
468
-    ifconfig ${WIFI_INTERFACE} up
472
+    #ifconfig ${WIFI_INTERFACE} up
473
+    ifup $WIFI_INTERFACE
469 474
 }
470 475
 
471 476
 function wifi_networks_file_header {