No wifi encryption
This commit is contained in:
parent
ddc7f1a7bb
commit
45810fa92d
|
@ -166,9 +166,32 @@ function wifi_wpa2_psk {
|
||||||
|
|
||||||
function wifi_none {
|
function wifi_none {
|
||||||
ssid=$1
|
ssid=$1
|
||||||
echo "auto $WIFI_INTERFACE" > /etc/network/interfaces.d/wifi
|
|
||||||
echo "iface $WIFI_INTERFACE inet dhcp" >> /etc/network/interfaces.d/wifi
|
if [ ! -f /etc/network/interfaces_original ]; then
|
||||||
echo " wireless-essid $ssid" >> /etc/network/interfaces.d/wifi
|
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 {
|
function show_help {
|
||||||
|
|
Loading…
Reference in New Issue