Bring up wlan0 when wifi is enabled
This commit is contained in:
parent
749536afcd
commit
1f276cb232
|
@ -71,6 +71,7 @@ function hotspot_off {
|
|||
fi
|
||||
|
||||
systemctl restart network-manager
|
||||
ifdown wlan0
|
||||
}
|
||||
|
||||
function hotspot_on {
|
||||
|
@ -137,6 +138,7 @@ function hotspot_on {
|
|||
echo " bridge_ports $WIFI_INTERFACE eth0" >> /etc/network/interfaces
|
||||
|
||||
systemctl restart network-manager
|
||||
ifup wlan0
|
||||
systemctl restart hostapd
|
||||
}
|
||||
|
||||
|
@ -166,6 +168,7 @@ function wifi_wpa2_psk {
|
|||
wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
|
||||
|
||||
systemctl restart network-manager
|
||||
ifup wlan0
|
||||
}
|
||||
|
||||
function wifi_none {
|
||||
|
@ -196,6 +199,7 @@ function wifi_none {
|
|||
echo '}' >> $WIFI_CONFIG
|
||||
|
||||
systemctl restart network-manager
|
||||
ifup wlan0
|
||||
}
|
||||
|
||||
function networks_from_file {
|
||||
|
@ -259,6 +263,7 @@ function networks_from_file {
|
|||
done < $WIFI_NETWORKS_FILE
|
||||
|
||||
systemctl restart network-manager
|
||||
ifup wlan0
|
||||
}
|
||||
|
||||
function create_networks_interactive {
|
||||
|
@ -331,6 +336,7 @@ function disable_wifi {
|
|||
echo '# Include files from /etc/network/interfaces.d:' >> /etc/network/interfaces
|
||||
echo 'source-directory /etc/network/interfaces.d' >> /etc/network/interfaces
|
||||
systemctl restart network-manager
|
||||
ifdown wlan0
|
||||
else
|
||||
networks_from_file
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue