updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / lib32-hal / hal-remove-dell-killswitch.patch
blobae0cf7a2b8517cfd05a8d91a468e9b162eba38c5
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
4 @@ -8,11 +8,6 @@
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
11 -fi
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
17 exit 1
19 exit ${value}
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?
23 - $DELL_WCTL --st_bt
24 - value=$?
25 - if [ "$value" = "0" ]; then
26 - exit 1
27 - elif [ "$value" = "1" ]; then
28 - exit 0
29 - else
30 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
31 - echo "dellWirelessCtl returned $value" >&2
32 - exit 1
33 - fi
34 - else
35 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
36 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
37 - exit 1
38 - fi
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
41 if [ $? -eq 0 ]; then
42 @@ -55,56 +31,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
43 echo "Access type not supported" >&2
44 exit 1
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
51 - value=$?
52 - if [ "$value" = "0" ]; then
53 - exit 1
54 - elif [ "$value" = "1" ]; then
55 - exit 0
56 - else
57 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
58 - echo "dellWirelessCtl returned $value" >&2
59 - exit 1
60 - fi
61 - else
62 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
63 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
64 - exit 1
65 - fi
66 - else
67 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
68 - echo "Access type not supported" >&2
69 - exit 1
70 - fi
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
76 - value=$?
77 - if [ "$value" = "0" ]; then
78 - exit 1
79 - elif [ "$value" = "1" ]; then
80 - exit 0
81 - else
82 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
83 - echo "dellWirelessCtl returned $value" >&2
84 - exit 1
85 - fi
86 - else
87 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
88 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
89 - exit 1
90 - fi
91 - else
92 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
93 - echo "Access type not supported" >&2
94 - exit 1
95 - fi
96 else
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
102 @@ -8,11 +8,6 @@
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
115 exit 1
117 exit 0
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
122 - $DELL_WCTL --bt 1
123 - ret=$?
124 - else
125 - $DELL_WCTL --bt 0
126 - ret=$?
127 - fi
128 - if [ "$ret" != "0" ]; then
129 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
130 - echo "dellWirelessCtl returned $ret" >&2
131 - exit 1
132 - fi
133 - else
134 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
135 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
136 - exit 1
137 - fi
138 elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then
139 if [ "$value" = "true" ]; then
140 bit=1;
141 @@ -61,60 +36,6 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "blue
142 echo "Access type not supported" >&2
143 exit 1
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
152 - ret=$?
153 - else
154 - $DELL_WCTL --sw_wlan 0 --wlan 0
155 - ret=$?
156 - fi
157 - if [ "$ret" != "0" ]; then
158 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
159 - echo "dellWirelessCtl returned $ret" >&2
160 - exit 1
161 - fi
162 - else
163 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
164 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
165 - exit 1
166 - fi
167 - else
168 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
169 - echo "Access type not supported" >&2
170 - exit 1
171 - fi
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
179 - ret=$?
180 - else
181 - $DELL_WCTL --sw_wwan 0 --wwan 0
182 - ret=$?
183 - fi
184 - if [ "$ret" != "0" ]; then
185 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
186 - echo "dellWirelessCtl returned $ret" >&2
187 - exit 1
188 - fi
189 - else
190 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
191 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2
192 - exit 1
193 - fi
194 - else
195 - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
196 - echo "Access type not supported" >&2
197 - exit 1
198 - fi
199 else
200 echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2
201 echo "Killswitch type not supported" >&2