diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-24 17:49:09 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-24 17:49:09 +0100 |
commit | 9062b23867e2968152883ed3f7d66ab2b1dd918c (patch) | |
tree | bc8ee6579b72b1b610df03bb89bcca60ffb25ff8 | |
parent | 35ccf5b5f29e649620f0ec46c768708bc95af178 (diff) | |
download | itzks-install-script-9062b23867e2968152883ed3f7d66ab2b1dd918c.tar.gz itzks-install-script-9062b23867e2968152883ed3f7d66ab2b1dd918c.tar.bz2 itzks-install-script-9062b23867e2968152883ed3f7d66ab2b1dd918c.zip |
Detect (a system's first) WIFIDEV automatically.
-rw-r--r-- | install-itzks-workstation | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/install-itzks-workstation b/install-itzks-workstation index 5df98bc..d60a73b 100644 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -92,21 +92,18 @@ editor /etc/default/nfs-common # 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 - : +FOUND=`iwconfig | grep "IEE 802.11"` +WIFIDEV=$(echo "$FOUND" | awk '{print $1}') + +if [ -n "$FOUND" ]; then + export WIFIDEV + # 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 + wpa_passphrase $ssid $passw >> /etc/wpa_supplicant/wpa_supplicant-$WIFIDEV.conf fi - #################### # Install puppet-agent |