diff options
author | Benjamin Schlüter <bschlueter@posteo.de> | 2018-01-24 14:27:16 +0100 |
---|---|---|
committer | Benjamin Schlüter <bschlueter@posteo.de> | 2018-01-24 14:27:16 +0100 |
commit | dfb3fa5a8829dba7e33fc5ca048680b6cfb057e7 (patch) | |
tree | 32206416e9bc4d3a74084b3de469495531ac1fa9 /install-itzks-workstation | |
parent | 1ce6e1c6fe6bedadc907b1cde2e41dfa4be0bee5 (diff) | |
download | itzks-install-script-dfb3fa5a8829dba7e33fc5ca048680b6cfb057e7.tar.gz itzks-install-script-dfb3fa5a8829dba7e33fc5ca048680b6cfb057e7.tar.bz2 itzks-install-script-dfb3fa5a8829dba7e33fc5ca048680b6cfb057e7.zip |
itzks-installscrit: Add check to see if a WiFi-Interface is available before asking for SSID and PW.
Diffstat (limited to 'install-itzks-workstation')
-rw-r--r-- | install-itzks-workstation | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation index 8f0dfd2..d8f1e53 100644 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -31,19 +31,19 @@ invoke-rc.d fetch-ldap-cert start # Alternate add itzks-package repo only if not already there if [ -e /etc/apt/sources.list.d/itzks.list ] then - : + : else - touch /etc/apt/sources.list.d/itzks.list + touch /etc/apt/sources.list.d/itzks.list fi # Add repos to itzks.list if empty if [ -s /etc/apt/sources.list.d/itzks.list ] then - : + : else - echo "deb http://packages.it-zukunt-schule.de/debian stretch main contrib non-free" >> /etc/apt/sources.list.d/itzks.list - echo "deb http://packages.it-zukunft-schule.de/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/itzks.list - echo "deb http://packages.it-zukunft-schuke.de/debian sid main contrib non-free" >> /etc/apt/sources.list.d/itzks.list + echo "deb http://packages.it-zukunt-schule.de/debian stretch main contrib non-free" >> /etc/apt/sources.list.d/itzks.list + echo "deb http://packages.it-zukunft-schule.de/debian stretch-backports main contrib non-free" >> /etc/apt/sources.list.d/itzks.list + echo "deb http://packages.it-zukunft-schuke.de/debian sid main contrib non-free" >> /etc/apt/sources.list.d/itzks.list fi # Add itzks-package repo @@ -123,11 +123,28 @@ apt-get autoremove --purge gnome-packagekit #################### # Add system-wide WiFi-config -echo '! WIFI-Netzwerk hinzufügen' -read -p 'Wie lautet die SSID? ' ssid -read -p 'Wie lautet das zugehörige Passwort? ' passw -export WIFIDEV=wlan0 -wpa_passphrase $ssid $passw >> /etc/wpa_supplicant/wpa_supplicant-$WIFIDEV.conf +# echo '! WIFI-Netzwerk hinzufügen' +# read -p 'Wie lautet die SSID? ' ssid +# read -p 'Wie lautet das zugehörige Passwort? ' passw +# export WIFIDEV=wlan0 +# wpa_passphrase $ssid $passw >> /etc/wpa_supplicant/wpa_supplicant-$WIFIDEV.conf + +# Alternate: Check for WiFi-Interface before asking for SSID and PW + +FOUND=`grep "wlan0" /proc/net/dev` + +if [ -n "$FOUND" ] + then + # Add system-wide WiFi-config + echo '! WIFI-Netzwerk hinzufügen' + read -p 'Wie lautet die SSID? ' ssid + read -p 'Wie lautet das zugehörige Passwort? ' passw + export WIFIDEV=wlan0 + wpa_passphrase $ssid $passw >> /etc/wpa_supplicant/wpa_supplicant-$WIFIDEV.conf + else + : +fi + #################### |