From 9f4a6f5c904dc23d3b2752ea362ecc1f24585683 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Tue, 11 Aug 2009 08:04:57 -0400 Subject: Don't overwrite existing $WEP_OPTS Signed-off-by: Jim Pryor --- src/connections/wireless | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/connections/wireless') 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 -- cgit v1.2.3-24-g4f1b