Wasn't quite ready.

This commit is contained in:
solomon 2002-10-31 00:30:45 +00:00
parent f08ee9d934
commit 04df2e5867
2 changed files with 11 additions and 34 deletions

View File

@ -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 ; \

View File

@ -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