aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-wireless14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifup-wireless b/sysconfig/network-scripts/ifup-wireless
index ace878f4..537eadcd 100755
--- a/sysconfig/network-scripts/ifup-wireless
+++ b/sysconfig/network-scripts/ifup-wireless
@@ -1,6 +1,6 @@
#!/bin/bash
# Network Interface Configuration System
-# Copyright (c) 1996-2001 Red Hat, Inc. all rights reserved.
+# Copyright (c) 1996-2002 Red Hat, Inc. all rights reserved.
#
# Based on PCMCIA wireless script by (David Hinds/Jean Tourrilhes)
#
@@ -34,17 +34,17 @@ if [ -n "$MODE" ] ; then
iwconfig $DEVICE mode $MODE
fi
# This is a bit hackish, but should do the job right...
-if [ -n "$ESSID" ] || [ -n "$MODE" ] ; then
+if [ -n "$ESSID" -o -n "$MODE" ] ; then
NICKNAME=`/bin/hostname`
- iwconfig $DEVICE nick $NICKNAME >/dev/null 2>&1
+ iwconfig $DEVICE nick \"$NICKNAME\" >/dev/null 2>&1
fi
# Regular stuff...
if [ -n "$NWID" ] ; then
iwconfig $DEVICE nwid $NWID
fi
-if [ -n "$FREQ" ] ; then
+if [ -n "$FREQ" -a "$MODE" != "Managed" ] ; then
iwconfig $DEVICE freq $FREQ
-elif [ -n "$CHANNEL" ] ; then
+elif [ -n "$CHANNEL" -a "$MODE" != "Managed" ] ; then
iwconfig $DEVICE channel $CHANNEL
fi
if [ -n "$SENS" ] ; then
@@ -55,6 +55,8 @@ if [ -n "$RATE" ] ; then
fi
if [ -n "$KEY" ] ; then
iwconfig $DEVICE key $KEY
+else
+ iwconfig $DEVICE key off
fi
if [ -n "$RTS" ] ; then
iwconfig $DEVICE rts $RTS
@@ -81,5 +83,5 @@ fi
# when this is set, and things like encryption keys are better be
# defined if we want to discover the right set of APs/nodes.
if [ -n "$ESSID" ] ; then
- iwconfig $DEVICE essid "$ESSID"
+ iwconfig $DEVICE essid \"$ESSID\"
fi