Starting from the scripts Dan provided, I tried to add "set" to them. Here is what I've done
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.htmlAttachment:
10-ipw-rfkill-switch.fdi
Description: Binary data
--- hal-system-killswitch-get-power-linux.ORIG 2007-06-22 22:33:24.000000000 -0400
+++ hal-system-killswitch-get-power-linux 2007-06-22 23:13:39.000000000 -0400
@@ -47,6 +47,17 @@
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $value" >&2
fi
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ] && [ -x /usr/bin/ipwWirelessCtl ]; then
+ /usr/bin/ipwWirelessCtl getrfkill
+ value=$?
+ if [ "$value" = "0" ]; then
+ exit 1
+ elif [ "$value" = "1" ] || [ "$value" = "2" ] || [ "$value" = "3" ]; then
+ exit 0
+ else
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "ipwWirelessCtl returned $value" >&2
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Access type not supported" >&2
--- hal-system-killswitch-set-power-linux.ORIG 2007-06-22 22:33:24.000000000 -0400
+++ hal-system-killswitch-set-power-linux 2007-06-22 23:13:39.000000000 -0400
@@ -47,6 +47,17 @@
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $value" >&2
fi
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ] && [ -x /usr/bin/ipwWirelessCtl ]; then
+ if [ "$value" = "true" ]; then
+ rf_value=1
+ elif [ "$value" = "false" ]; then
+ rf_value=0
+ fi
+
+ /usr/bin/ipwWirelessCtl getrfkill $rf_value
+ ret=$?
+ if [ "$ret" != "0" ]; then
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "ipwWirelessCtl returned $value" >&2
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Access type not supported" >&2
Attachment:
ipwWirelessCtl
Description: Binary data