Bring up wlan0 when wifi is enabled

This commit is contained in:
Bob Mottram 2016-05-04 15:59:36 +01:00
parent 749536afcd
commit 1f276cb232
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 10 additions and 4 deletions

View File

@ -71,6 +71,7 @@ function hotspot_off {
fi fi
systemctl restart network-manager systemctl restart network-manager
ifdown wlan0
} }
function hotspot_on { function hotspot_on {
@ -137,6 +138,7 @@ function hotspot_on {
echo " bridge_ports $WIFI_INTERFACE eth0" >> /etc/network/interfaces echo " bridge_ports $WIFI_INTERFACE eth0" >> /etc/network/interfaces
systemctl restart network-manager systemctl restart network-manager
ifup wlan0
systemctl restart hostapd systemctl restart hostapd
} }
@ -166,6 +168,7 @@ function wifi_wpa2_psk {
wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
systemctl restart network-manager systemctl restart network-manager
ifup wlan0
} }
function wifi_none { function wifi_none {
@ -196,6 +199,7 @@ function wifi_none {
echo '}' >> $WIFI_CONFIG echo '}' >> $WIFI_CONFIG
systemctl restart network-manager systemctl restart network-manager
ifup wlan0
} }
function networks_from_file { function networks_from_file {
@ -259,6 +263,7 @@ function networks_from_file {
done < $WIFI_NETWORKS_FILE done < $WIFI_NETWORKS_FILE
systemctl restart network-manager systemctl restart network-manager
ifup wlan0
} }
function create_networks_interactive { function create_networks_interactive {
@ -331,6 +336,7 @@ function disable_wifi {
echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
systemctl restart network-manager systemctl restart network-manager
ifdown wlan0
else else
networks_from_file networks_from_file
fi fi