[PATCH hal 1/2] fix misplacement of the ipw killswitch
Faidon Liambotis
paravoid at debian.org
Sun Aug 5 05:26:05 PDT 2007
The ipw 'if' block in the killswitch scripts was incorrectly placed.
---
tools/linux/hal-system-killswitch-get-power-linux | 22 ++++++++++----------
tools/linux/hal-system-killswitch-set-power-linux | 12 +++++-----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/tools/linux/hal-system-killswitch-get-power-linux b/tools/linux/hal-system-killswitch-get-power-linux
index ec254da..f19d1f4 100755
--- a/tools/linux/hal-system-killswitch-get-power-linux
+++ b/tools/linux/hal-system-killswitch-get-power-linux
@@ -47,22 +47,22 @@ elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $value" >&2
fi
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ]; then
+ hal-ipw-killswitch-linux getrfkill
+ value=$?
+ if [ "$value" = "0" ]; then
+ exit 1
+ elif [ "$value" = "1" ]; then
+ exit 0
+ else
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "hal-ipw-killswitch-linux returned $value" >&2
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Access type not supported" >&2
exit 1
fi
-elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ]; then
- hal-ipw-killswitch-linux getrfkill
- value=$?
- if [ "$value" = "0" ]; then
- exit 1
- elif [ "$value" = "1" ]; then
- exit 0
- else
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
- echo "hal-ipw-killswitch-linux returned $value" >&2
- fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Killswitch type not supported" >&2
diff --git a/tools/linux/hal-system-killswitch-set-power-linux b/tools/linux/hal-system-killswitch-set-power-linux
index 5374af4..85a4548 100755
--- a/tools/linux/hal-system-killswitch-set-power-linux
+++ b/tools/linux/hal-system-killswitch-set-power-linux
@@ -54,12 +54,7 @@ elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "dellWirelessCtl returned $ret" >&2
fi
- else
- echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
- echo "Access type not supported" >&2
- exit 1
- fi
-elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ]; then
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ]; then
if [ "$value" = "true" ]; then
rf_value=0
elif [ "$value" = "false" ]; then
@@ -71,6 +66,11 @@ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "ipw" ]; then
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "hal-ipw-killswitch-linux returned $value" >&2
fi
+ else
+ echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
+ echo "Access type not supported" >&2
+ exit 1
+ fi
else
echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
echo "Killswitch type not supported" >&2
--
1.5.2.4
More information about the hal
mailing list