hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Fri Aug 10 05:41:48 PDT 2007


 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(-)

New commits:
diff-tree a8a8333385e54620e928c167172d418abee42c57 (from e02e6347eef578b59f514dfa7109c9093b28aebd)
Author: Faidon Liambotis <paravoid at debian.org>
Date:   Fri Aug 10 14:41:52 2007 +0200

    fix misplacement of the ipw killswitch
    
    The ipw 'if' block in the killswitch scripts was incorrectly placed.

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" = "wl
 	    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" = "wl
 	    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_METH
 		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


More information about the hal-commit mailing list