This commit is contained in:
Bob Mottram 2016-10-21 15:50:17 +01:00
parent be9a992a0b
commit 1a907219b0
1 changed files with 3 additions and 9 deletions

View File

@ -297,10 +297,8 @@ function wifi_wpa2_psk {
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet dhcp" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
wpa_passphrase "$ssid" "$passphrase" > $WIFI_CONFIG
@ -325,10 +323,8 @@ function wifi_none {
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet dhcp" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
echo 'network={' > $WIFI_CONFIG
echo " ssid=\"${ssid}\"" >> $WIFI_CONFIG
@ -363,10 +359,8 @@ function networks_from_file {
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo "allow-hotplug ${WIFI_INTERFACE}" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet manual" >> /etc/network/interfaces
echo "iface ${WIFI_INTERFACE} inet dhcp" >> /etc/network/interfaces
echo " wpa-roam $WIFI_CONFIG" >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
# remove wpa_supplicant.conf if it exists
if [ -f $WIFI_CONFIG ]; then