No wifi encryption

This commit is contained in:
Bob Mottram 2016-04-26 16:45:15 +01:00
parent ddc7f1a7bb
commit 45810fa92d
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 26 additions and 3 deletions

View File

@ -166,9 +166,32 @@ function wifi_wpa2_psk {
function wifi_none {
ssid=$1
echo "auto $WIFI_INTERFACE" > /etc/network/interfaces.d/wifi
echo "iface $WIFI_INTERFACE inet dhcp" >> /etc/network/interfaces.d/wifi
echo " wireless-essid $ssid" >> /etc/network/interfaces.d/wifi
if [ ! -f /etc/network/interfaces_original ]; then
if ! grep -q "# wifi enabled" /etc/network/interfaces; then
cp /etc/network/interfaces /etc/network/interfaces_original
fi
fi
echo '# wifi enabled' > /etc/network/interfaces
echo 'auto lo' >> /etc/network/interfaces
echo 'iface lo inet loopback' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'allow-hotplug eth0' >> /etc/network/interfaces
echo 'iface eth0 inet dhcp' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'allow-hotplug wlan0' >> /etc/network/interfaces
echo 'iface wlan0 inet manual' >> /etc/network/interfaces
echo 'wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces
echo 'iface default inet dhcp' >> /etc/network/interfaces
echo 'network={' > /etc/wpa_supplicant/wpa_supplicant.conf
echo " ssid=\"${ssid}\"" >> /etc/wpa_supplicant/wpa_supplicant.conf
echo ' key_mgmt=NONE' >> /etc/wpa_supplicant/wpa_supplicant.conf
echo '}' >> /etc/wpa_supplicant/wpa_supplicant.conf
systemctl restart network-manager
}
function show_help {