4 # Script to set the mode for MADWIFI. Should be called by ifup.
5 # Copyright (C) 2007 The Trustees of Princeton University
7 . /etc/sysconfig/network-scripts/network-functions
11 WLANDEV=$(basename $(readlink -e /sys/class/net/$DEVICE/device/net:wifi* 2>/dev/null) 2>/dev/null)
12 if [ -n "$MODE$WLANDEV" ]; then
13 wlanconfig "$DEVICE" destroy &> /dev/null
14 m=$( echo "$MODE" | tr '[A-Z]' '[a-z]' | tr -d - )
26 wlanconfig "$DEVICE" create wlandev $WLANDEV wlanmode "$m" > /dev/null