summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-11 14:04:57 +0200
committerJames Rayner <james@archlinux.org>2009-08-15 04:28:27 +0200
commit9f4a6f5c904dc23d3b2752ea362ecc1f24585683 (patch)
tree0ddb1a20e207458824ca1502d9b24cbf27e37686 /src
parent75187169a35b4fcd899d04a4860a9aad64d6c518 (diff)
downloadnetctl-9f4a6f5c904dc23d3b2752ea362ecc1f24585683.tar.gz
netctl-9f4a6f5c904dc23d3b2752ea362ecc1f24585683.tar.xz
Don't overwrite existing $WEP_OPTS
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src')
-rw-r--r--src/connections/wireless12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/connections/wireless b/src/connections/wireless
index d9b457a..5ec555c 100644
--- a/src/connections/wireless
+++ b/src/connections/wireless
@@ -75,11 +75,13 @@ wireless_up() {
case $SECURITY in
wep|none)
# 'none' uses iwconfig like wep. Use sane default if WEP_OPTS=""
- if [[ "$SECURITY" = "wep" ]]; then
- WEP_OPTS="essid \"$ESSID\" key $KEY"
- elif [[ "$SECURITY" = "none" ]]; then
- WEP_OPTS="essid \"$ESSID\""
- fi
+ if [[ -z "$WEP_OPTS" ]]; then
+ if [[ "$SECURITY" = "wep" ]]; then
+ WEP_OPTS="essid \"$ESSID\" key $KEY"
+ elif [[ "$SECURITY" = "none" ]]; then
+ WEP_OPTS="essid \"$ESSID\""
+ fi
+ fi
quirk "predown" && ifconfig $INTERFACE down # madwifi FS#10585