summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-07-13 19:47:30 +0200
committerThomas Bächler <thomas@archlinux.org>2010-07-13 19:47:30 +0200
commit6b626a4773a26b4275cd7be663a5d7547ea4cb11 (patch)
tree8b590d508f736525945c74ba26775cd177d6a8ab
parent773aee9bd7bbee0b109f6e2fe4582580c03a3488 (diff)
downloadnetctl-6b626a4773a26b4275cd7be663a5d7547ea4cb11.tar.gz
netctl-6b626a4773a26b4275cd7be663a5d7547ea4cb11.tar.xz
wireless: Add support for hidden ssid
-rw-r--r--examples/wireless-open2
-rw-r--r--examples/wireless-wep2
-rw-r--r--examples/wireless-wep-string-key2
-rw-r--r--examples/wireless-wpa2
-rw-r--r--examples/wireless-wpa-config2
-rw-r--r--examples/wireless-wpa-static2
-rw-r--r--src/8021x7
7 files changed, 19 insertions, 0 deletions
diff --git a/examples/wireless-open b/examples/wireless-open
index be7e9fc..db8d6ef 100644
--- a/examples/wireless-open
+++ b/examples/wireless-open
@@ -4,3 +4,5 @@ INTERFACE='wlan0'
SECURITY='none'
ESSID='MyNetwork'
IP='dhcp'
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/examples/wireless-wep b/examples/wireless-wep
index c6c9cb3..d0eeaba 100644
--- a/examples/wireless-wep
+++ b/examples/wireless-wep
@@ -5,3 +5,5 @@ SECURITY='wep'
ESSID='MyNetwork'
KEY='1234567890'
IP='dhcp'
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/examples/wireless-wep-string-key b/examples/wireless-wep-string-key
index 3d0b2c2..ebc4b0a 100644
--- a/examples/wireless-wep-string-key
+++ b/examples/wireless-wep-string-key
@@ -5,3 +5,5 @@ SECURITY='wep'
ESSID='MyNetwork'
KEY='s:Wireless Key'
IP='dhcp'
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/examples/wireless-wpa b/examples/wireless-wpa
index f6b7eb4..20f5509 100644
--- a/examples/wireless-wpa
+++ b/examples/wireless-wpa
@@ -5,3 +5,5 @@ SECURITY='wpa'
ESSID='MyNetwork'
KEY='WirelessKey'
IP='dhcp'
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/examples/wireless-wpa-config b/examples/wireless-wpa-config
index 864199f..955d845 100644
--- a/examples/wireless-wpa-config
+++ b/examples/wireless-wpa-config
@@ -4,3 +4,5 @@ INTERFACE='wlan0'
SECURITY='wpa-config'
WPA_CONF='/etc/wpa_supplicant.conf'
IP='dhcp'
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/examples/wireless-wpa-static b/examples/wireless-wpa-static
index 751f00f..25da514 100644
--- a/examples/wireless-wpa-static
+++ b/examples/wireless-wpa-static
@@ -8,3 +8,5 @@ IP='static' # Any other CONNECTION='ethernet' options may be used.
ADDR='192.168.1.23'
GATEWAY='192.168.1.1'
DNS=('192.168.1.1')
+# Uncomment this if your ssid is hidden
+#HIDDEN=yes
diff --git a/src/8021x b/src/8021x
index 7657ead..e954f2b 100644
--- a/src/8021x
+++ b/src/8021x
@@ -88,6 +88,13 @@ make_wpa_config() {
return 1
;;
esac
+
+ # Hidden SSID
+ shopt -s nocasematch
+ if [[ $HIDDEN == "yes" ]]; then
+ echo "scan_ssid=1"
+ fi
+ shopt -u nocasematch
}
# vim: ft=sh ts=4 et sw=4: