On Sat, Feb 10, 2007, Nico Golde wrote: > isAnyWirelessPoweredOn() Can you test this version? isAnyWirelessPoweredOn() { for DEVICE in /sys/class/net/* ; do if [ -d $DEVICE/wireless -a -r $DEVICE/device/power/state ] ; then # if any of the wireless devices is turned on, return success test "$(cat $DEVICE/device/power/state)" -ne 0 && return 0 fi done # return failure return 1 }
(I don't have a "state" entry in sysfs for my card.) -- Loïc Minier <[EMAIL PROTECTED]>