Bläddra i källkod

wifi up commands

Bob Mottram 8 år sedan
förälder
incheckning
0789dc350b
1 ändrade filer med 10 tillägg och 5 borttagningar
  1. 10
    5
      src/freedombone-utils-wifi

+ 10
- 5
src/freedombone-utils-wifi Visa fil

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