[ARMedslack] rc.wireless problem
Davide
louigi600 at yahoo.it
Sun Mar 20 01:53:05 UTC 2011
Hi all.
I noticed this thing that drove me a little mad.
the slackware rc.wireless scritp checks out if a device is wireless by this function in the script:
is_wireless_device ()
{
#[ -x $IWPATH/iwconfig ] || return 1
#LC_ALL=C $IWPATH/iwconfig $1 2>&1 | \
# grep -Eiq "no wireless extensions|no such device" || return 0
#return 1
if [ ! -d /sys/class/net/${1}/wireless ]; then
# no wireless interface
return 1
else
# interface has wireless extensions
return 0
fi
}
Well it appears that the sys tree may be missing /sys/class/net/${1}/wireless (at least with kirkwood current kernel).
Most people would not notice this issue untill you try to get a wireless NIC to be correctly configures right after you plug it in.
Not sure if this is an architecture port issue, a kernel issue or a dockstar specific issue but I changed that function towork around the problem:
is_wireless_device ()
{
if [ $($IWCOMMAND |grep -c "IEEE 802") -eq 0 ]; then
# no wireless interface
return 1
else
# interface has wireless extensions
return 0
fi
}
This relies on what iwconfig has to say about the NIC, which in case it's an architecture difference, should work regardless of the underlying ARCH so long as iwconfig is working properly.
Regards
David
More information about the ARMedslack
mailing list