summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--install-itzks-workstation23
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