1 diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux
2 --- hal-0.5.12/tools/linux/hal-system-killswitch-get-power-linux 2008-08-22 07:34:47.000000000 +0100
3 +++ hal-0.5.12.new/tools/linux/hal-system-killswitch-get-power-linux 2009-03-03 10:45:20.000000000 +0000
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 -DELL_WCTL=/usr/bin/dellWirelessCtl
9 -if [ -x "/usr/sbin/dellWirelessCtl" ]; then
10 - DELL_WCTL=/usr/sbin/dellWirelessCtl
13 if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
14 if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
15 value="`hal-system-sonypic getbluetooth`"
16 @@ -22,25 +17,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
20 - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
21 - if [ -x "$DELL_WCTL" ]; then
22 - # TODO: write our own binary that links with libsmbios?
25 - if [ "$value" = "0" ]; then
27 - elif [ "$value" = "1" ]; then
30 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
31 - echo "dellWirelessCtl returned $value" >&2
35 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
36 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
39 elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -r "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
40 read value < $HAL_PROP_LINUX_SYSFS_PATH 2> /dev/null
42 @@ -55,56 +31,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
43 echo "Access type not supported" >&2
46 -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
47 - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
48 - if [ -x "$DELL_WCTL" ]; then
49 - # TODO: write our own binary that links with libsmbios?
50 - $DELL_WCTL --st_wlan
52 - if [ "$value" = "0" ]; then
54 - elif [ "$value" = "1" ]; then
57 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
58 - echo "dellWirelessCtl returned $value" >&2
62 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
63 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
67 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
68 - echo "Access type not supported" >&2
71 -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
72 - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
73 - if [ -x "$DELL_WCTL" ]; then
74 - # TODO: write our own binary that links with libsmbios?
75 - $DELL_WCTL --st_wwan
77 - if [ "$value" = "0" ]; then
79 - elif [ "$value" = "1" ]; then
82 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
83 - echo "dellWirelessCtl returned $value" >&2
87 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
88 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
92 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
93 - echo "Access type not supported" >&2
97 echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
98 echo "Killswitch type not supported" >&2
99 diff -upr hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux
100 --- hal-0.5.12/tools/linux/hal-system-killswitch-set-power-linux 2008-10-24 09:45:54.000000000 +0100
101 +++ hal-0.5.12.new/tools/linux/hal-system-killswitch-set-power-linux 2009-03-03 10:44:49.000000000 +0000
103 # the Free Software Foundation; either version 2 of the License, or
104 # (at your option) any later version.
106 -DELL_WCTL=/usr/bin/dellWirelessCtl
107 -if [ -x "/usr/sbin/dellWirelessCtl" ]; then
108 - DELL_WCTL=/usr/sbin/dellWirelessCtl
111 if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
112 if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
113 hal-system-sonypic setbluetooth $value
114 @@ -23,26 +18,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
118 - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
119 - if [ -x "$DELL_WCTL" ]; then
120 - # TODO: write our own binary that links with libsmbios?
121 - if [ "$value" = "true" ]; then
128 - if [ "$ret" != "0" ]; then
129 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
130 - echo "dellWirelessCtl returned $ret" >&2
134 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
135 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
138 elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
139 if [ "$value" = "true" ]; then
141 @@ -61,60 +36,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
142 echo "Access type not supported" >&2
145 -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
146 - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
147 - if [ -x "$DELL_WCTL" ]; then
148 - # As a side effect we disable the physical kill switch
149 - # TODO: write our own binary that links with libsmbios?
150 - if [ "$value" = "true" ]; then
151 - $DELL_WCTL --sw_wlan 0 --wlan 1
154 - $DELL_WCTL --sw_wlan 0 --wlan 0
157 - if [ "$ret" != "0" ]; then
158 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
159 - echo "dellWirelessCtl returned $ret" >&2
163 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
164 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
168 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
169 - echo "Access type not supported" >&2
172 -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then
173 - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
174 - if [ -x "$DELL_WCTL" ]; then
175 - # As a side effect we disable the physical kill switch
176 - # TODO: write our own binary that links with libsmbios?
177 - if [ "$value" = "true" ]; then
178 - $DELL_WCTL --sw_wwan 0 --wwan 1
181 - $DELL_WCTL --sw_wwan 0 --wwan 0
184 - if [ "$ret" != "0" ]; then
185 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
186 - echo "dellWirelessCtl returned $ret" >&2
190 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
191 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
195 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
196 - echo "Access type not supported" >&2
200 echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
201 echo "Killswitch type not supported" >&2