summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-08-15 15:36:23 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-08-15 15:36:23 +0200
commita2b290b81adfbe7e619cf82101bdd1c13de64566 (patch)
treed4213021eb68590343bd5e78691129c37cc3b717 /src
parent8dec3ca378062e538dd97eba1712338bbebc8f33 (diff)
downloadnetctl-a2b290b81adfbe7e619cf82101bdd1c13de64566.tar.gz
netctl-a2b290b81adfbe7e619cf82101bdd1c13de64566.tar.xz
Add option ESSID_TYPE=hex to support hexadecimal ESSIDs (FS#24333)
Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/8021x14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/8021x b/src/8021x
index 3de0a00..e2db408 100644
--- a/src/8021x
+++ b/src/8021x
@@ -186,7 +186,19 @@ make_wpa_config_file() {
make_wpa_config() {
case $SECURITY in
wep|wep-old|wpa|none|none-old)
- echo "ssid=\"$ESSID\""
+ case "${ESSID_TYPE:-ascii}" in
+ ascii)
+ echo "ssid=\"$ESSID\""
+ ;;
+ hex)
+ # Hex ESSID is written unquoted ans lowercase (FS#24333)
+ echo "ssid=${ESSID,,}"
+ ;;
+ *)
+ report_fail "ESSID_TYPE must be set to 'ascii' or 'hex'."
+ return 1
+ ;;
+ esac
if [[ -n "$AP" ]]; then
echo "bssid=${AP,,}"
fi