Update of /cvsroot/devil-linux/build/config/etc/init.d
In directory sc8-pr-cvs1:/tmp/cvs-serv32152/config/etc/init.d
Modified Files:
network
Log Message:
initial checkin of wireless support for network init
Index: network
===================================================================
RCS file: /cvsroot/devil-linux/build/config/etc/init.d/network,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- network 31 Dec 2003 17:37:05 -0000 1.23
+++ network 31 Dec 2003 17:47:59 -0000 1.24
@@ -108,6 +108,25 @@
sleep 5
}
+setup_wireless () {
+ # the interface to do dhcp on
+ local DEVICE=$1
+ # the software options
+ local OPTIONS=""
+
+ [ -n "$ESSID" ] && OPTIONS="$OPTIONS essid \"$ESSID\""
+ [ -n "$NWID" ] && OPTIONS="$OPTIONS nwid \"$NWID\""
+ [ -n "$CHANNEL" ] && OPTIONS="$OPTIONS channel \"$CHANNEL\""
+ [ -n "$MODE" ] && OPTIONS="$OPTIONS mode \"$MODE\""
+ [ -n "$AP" ] && OPTIONS="$OPTIONS ap \"$AP\""
+ [ -n "$RATE" ] && OPTIONS="$OPTIONS rate \"$RATE\""
+ [ -n "$KEY" ] && OPTIONS="$OPTIONS key \"$KEY\""
+
+ echo -n "Setting wireless options for interface $DEVICE"
+ iwconfig $DEVICE $OPTIONS
+ evaluate_retval
+}
+
setup_interface () {
# the interface to activate
IF=$1
@@ -138,6 +157,11 @@
if [ -n "$MODULE" ]; then
modprobe $MODULE > /dev/null
fi
+
+ if [ "$WIRELESS" = "yes" ]; then
+ setup_wireless $DEVICE
+ fi
+
# vlan-id needs to be a number. id's 0 and 4095 are reserved
if test -n "$VLANID" -a "$VLANID" -gt 0 -a "$VLANID" -lt 4095 2>/dev/null; then
|