From 04df2e58677ebac552dc6d56c0794041dfa6be31 Mon Sep 17 00:00:00 2001 From: solomon Date: Thu, 31 Oct 2002 00:30:45 +0000 Subject: [PATCH] Wasn't quite ready. --- etc/pcmcia/Makefile | 27 --------------------------- etc/wlan/shared | 18 +++++++++++------- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/etc/pcmcia/Makefile b/etc/pcmcia/Makefile index bd9c2d2..298eb25 100644 --- a/etc/pcmcia/Makefile +++ b/etc/pcmcia/Makefile @@ -59,33 +59,6 @@ install: fi ; \ cp wlan-ng $(TARGET_PCMCIA_DIR) ; \ chmod +x $(TARGET_PCMCIA_DIR)/wlan-ng ; \ - mkwlanopts () { \ - sed -e '/WLAN_VERSION=.*/s//WLAN_VERSION=$(WLAN_VERSION)/' \ - -e '/WLAN_PATCHLEVEL=.*/s//WLAN_PATCHLEVEL=$(WLAN_PATCHLEVEL)/' \ - -e '/WLAN_SUBLEVEL=.*/s//WLAN_SUBLEVEL=$(WLAN_SUBLEVEL)/' \ - -e '/WLAN_EXTRAVERSION=.*/s//WLAN_EXTRAVERSION=$(WLAN_EXTRAVERSION)/' \ - < ./wlan-ng.opts > $(TARGET_PCMCIA_DIR)/wlan-ng.opts; \ - } ; \ - if [ -f $(TARGET_PCMCIA_DIR)/wlan-ng.opts ]; then \ - if grep -qs WLAN_VERSION $(TARGET_PCMCIA_DIR)/wlan-ng.opts; then \ - mkver=$(WLAN_VERSION).$(WLAN_PATCHLEVEL).$(WLAN_SUBLEVEL)$(WLAN_EXTRAVERSION); \ - eval `grep "WLAN_VERSION=" $(TARGET_PCMCIA_DIR)/wlan-ng.opts`; \ - eval `grep "WLAN_PATCHLEVEL=" $(TARGET_PCMCIA_DIR)/wlan-ng.opts`; \ - eval `grep "WLAN_SUBLEVEL=" $(TARGET_PCMCIA_DIR)/wlan-ng.opts`; \ - eval `grep "WLAN_EXTRAVERSION=" $(TARGET_PCMCIA_DIR)/wlan-ng.opts`; \ - oldver=$$WLAN_VERSION.$$WLAN_PATCHLEVEL.$$WLAN_SUBLEVEL$$WLAN_EXTRAVERSION; \ - if [ $$mkver != $$oldver ]; then \ - mv -f $(TARGET_PCMCIA_DIR)/wlan-ng.opts $(TARGET_PCMCIA_DIR)/wlan-ng.opts.O ; \ - mkwlanopts ; \ - fi; \ - else \ - mv -f $(TARGET_PCMCIA_DIR)/wlan-ng.opts $(TARGET_PCMCIA_DIR)/wlan-ng.opts.O ; \ - mkwlanopts ; \ - fi; \ - else \ - mkwlanopts ; \ - fi ; \ - chmod +x $(TARGET_PCMCIA_DIR)/wlan-ng.opts ; \ if [ -f $(TARGET_PCMCIA_DIR)/wlan-ng.conf ]; then \ mv -f $(TARGET_PCMCIA_DIR)/wlan-ng.conf $(TARGET_PCMCIA_DIR)/wlan-ng.conf.O ; \ fi ; \ diff --git a/etc/wlan/shared b/etc/wlan/shared index 6352ebb..b7c5a81 100644 --- a/etc/wlan/shared +++ b/etc/wlan/shared @@ -103,18 +103,22 @@ wlan_source_config_for_ssid () { # $1 == ssid[:BSSID] + DesiredSSID=$1 + if [ X"$1" != X"" ] ; then - ssid=`echo $1 | sed -ne 's/\(.*\)\(:..:..:..:..:..:..\).*/\1/p` - bssid=`echo $1 | sed -ne 's/\(.*\):\(..:..:..:..:..:..\).*/\2/p` + token_ssid=`echo $1 | sed -ne 's/\(.*\)\(:..:..:..:..:..:..\).*/\1/p'` + token_bssid=`echo $1 | sed -ne 's/\(.*\):\(..:..:..:..:..:..\).*/\2/p'` fi - DesiredSSID="$ssid" - DesiredBSSID=$bssid - + if [ X"$token_ssid" != X"" ] ; then + DesiredSSID="$token_ssid" + DesiredBSSID=$token_bssid + fi + if [ -f "/etc/wlan/wlancfg-$1" ] ; then . "/etc/wlan/wlancfg-$1" - elif [ -f "/etc/wlan/wlancfg-$ssid" ] ; then - . "/etc/wlan/wlancfg-$ssid" + elif [ -f "/etc/wlan/wlancfg-$DesiredSSID" ] ; then + . "/etc/wlan/wlancfg-$DesiredSSID" else if [ X"$1" != X"" ] ; then