hal: Branch 'master'
David Zeuthen
david at kemper.freedesktop.org
Mon Mar 26 13:40:44 PDT 2007
tools/linux/hal-system-killswitch-get-power-linux | 8 ++++----
tools/linux/hal-system-killswitch-set-power-linux | 12 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
diff-tree 49e7d0686b3fb49c6fbf2d9ccb1ab962f8cf702f (from c4f14a5ca83357d7607ae0bc76030a0254337478)
Author: David Zeuthen <davidz at redhat.com>
Date: Mon Mar 26 16:40:45 2007 -0400
check that dellWirelessCtl exists before using it
diff --git a/tools/linux/hal-system-killswitch-get-power-linux b/tools/linux/hal-system-killswitch-get-power-linux
index 7249694..2915174 100755
--- a/tools/linux/hal-system-killswitch-get-power-linux
+++ b/tools/linux/hal-system-killswitch-get-power-linux
@@ -17,9 +17,9 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
exit 1
fi
exit ${value}
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
# TODO: write our own binary that links with libsmbios?
- dellWirelessCtl --st_bt
+ /usr/bin/dellWirelessCtl --st_bt
value=$?
if [ "$value" = "0" ]; then
exit 1
@@ -35,9 +35,9 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
exit 1
fi
elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
# TODO: write our own binary that links with libsmbios?
- dellWirelessCtl --st_wlan
+ /usr/bin/dellWirelessCtl --st_wlan
value=$?
if [ "$value" = "0" ]; then
exit 1
diff --git a/tools/linux/hal-system-killswitch-set-power-linux b/tools/linux/hal-system-killswitch-set-power-linux
index ef1785f..9e8ef3f 100755
--- a/tools/linux/hal-system-killswitch-set-power-linux
+++ b/tools/linux/hal-system-killswitch-set-power-linux
@@ -16,16 +16,16 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
exit 1
fi
exit 0
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
# As a side effect we disable the physical kill switch
# TODO: write our own binary that links with libsmbios?
if [ "$value" = "true" ]; then
- dellWirelessCtl --sw_bt 0 --bt 1
+ /usr/bin/dellWirelessCtl --sw_bt 0 --bt 1
ret=$?
else
- dellWirelessCtl --sw_bt 0 --bt 0
+ /usr/bin/dellWirelessCtl --sw_bt 0 --bt 0
ret=$?
fi
if [ "$ret" != "0" ]; then
@@ -38,16 +38,16 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
exit 1
fi
elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
# As a side effect we disable the physical kill switch
# TODO: write our own binary that links with libsmbios?
if [ "$value" = "true" ]; then
- dellWirelessCtl --sw_wlan 0 --wlan 1
+ /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 1
ret=$?
else
- dellWirelessCtl --sw_wlan 0 --wlan 0
+ /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 0
ret=$?
fi
if [ "$ret" != "0" ]; then
More information about the hal-commit
mailing list