« Бездротові ЛВС в справі | Бездротові мережі 54 Мбитс в смузі частот 24 і 5 Ггц »
# Initialize or shutdown а PCMCIA ethernet adapter
#
# This script should be invoked with two arguments. The first is the
# action to be taken, either “start”, “stop”, or “restart”. The
# second is the network interface name.
action=$1
device=$2
case “${action:?}” in
’start’)
/etc/sysconfig/network-scripts/ifup ifcfg-${device}
;;
’stop’)
/etc/sysconfig/network-scripts/ifdown ifcfg-${device}
;;
‘restart’)
/sbin/ifconfig ${device:?} down up
;;
esac
Конфігураційний файл:
——————————————- 7 ——————————–
Наявність файлу #/etc/pcmcia/wireless з !!!обязательным!!! вмістом:
#!/bin/sh
#
# wireless network 1.63 2000/02/09 03:12:42 (David Hinds/Jean Tourrilhes)
#
# Specific configuration of а PCMCIA wireless LAN adapter
#
# This script is invoked automatically by the network script; it should
# not be executed by hand.
#
# Note : it would be real cool to have the name of the driver as part
# of the extended device address
#
# Load site-specific settings
if [ -х ./wireless.opts ] ; then
. ./wireless.opts
else
. /etc/pcmcia/wireless.opts
fi
# Find the path where wireless tools are installed
for IWPATH in /usr/{bin,sbin} /usr/local/{bin,sbin} /sbin ; do
if [ -х $IWPATH/iwconfig ] ; then break ; fi
done
case “$ACTION” in
’start’)
[ "$VERBOSE" -a "$INFO" ] && echo “$INFO”
# Set all desired settings via iwconfig
# Mode need to be first : some settings apply only in а specific mode !
if [ "$MODE" ] ; then
log $IWPATH/iwconfig $DEVICE mode $MODE
fi
# This is а bit hackish, but should do the job right…
if [ "$ESSID" ] || [ "$MODE" ] ; then
NICKNAME=`/bin/hostname`
log $IWPATH/iwconfig $DEVICE nick $NICKNAME >/dev/null 2>&1
fi
# Regular stuff…
if [ "$NWID" ] ; then
log $IWPATH/iwconfig $DEVICE nwid $NWID
fi
if [ "$FREQ" ] ; then
log $IWPATH/iwconfig $DEVICE freq $FREQ
elif [ "$CHANNEL" ] ; then
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Tags: картка, модуль, настройка, робота, файл










