Annotation of /trunk/hal/patches/hal-0.5.10-fix-hal-to-work-with-libsmbios-v0.13.12.patch
Parent Directory | Revision Log
Revision 597 -
(hide annotations)
(download)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 4505 byte(s)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 4505 byte(s)
-gentoo patches
1 | niro | 597 | From 6ee2f0e550c1fbf2b649d95afc934dd5311ab6fe Mon Sep 17 00:00:00 2001 |
2 | From: Danny Kukawka <danny.kukawka@web.de> | ||
3 | Date: Mon, 12 Nov 2007 19:48:59 +0100 | ||
4 | Subject: [PATCH] fix hal to work with libsmbios v0.13.12 | ||
5 | |||
6 | Fixed HAL to work again with libsmbios v0.13.12 where the binaries | ||
7 | get moved from /usr/bin/ to /usr/sbin/. Needed to change some paths | ||
8 | in hal-system-killswitch-{g,s}et-power-linux to work with the new | ||
9 | and older versions correctly. | ||
10 | --- | ||
11 | tools/linux/hal-system-killswitch-get-power-linux | 15 +++++++++++---- | ||
12 | tools/linux/hal-system-killswitch-set-power-linux | 19 +++++++++++++------ | ||
13 | 2 files changed, 24 insertions(+), 10 deletions(-) | ||
14 | |||
15 | diff --git a/tools/linux/hal-system-killswitch-get-power-linux b/tools/linux/hal-system-killswitch-get-power-linux | ||
16 | index f19d1f4..c24253f 100755 | ||
17 | --- a/tools/linux/hal-system-killswitch-get-power-linux | ||
18 | +++ b/tools/linux/hal-system-killswitch-get-power-linux | ||
19 | @@ -8,6 +8,13 @@ | ||
20 | # the Free Software Foundation; either version 2 of the License, or | ||
21 | # (at your option) any later version. | ||
22 | |||
23 | +if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then | ||
24 | + DELL_WCTL=/usr/bin/dellWirelessCtl | ||
25 | + if [ -x /usr/sbin/dellWirelessCtl ]; then | ||
26 | + DELL_WCTL=/usr/sbin/dellWirelessCtl | ||
27 | + fi | ||
28 | +fi | ||
29 | + | ||
30 | if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
31 | if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then | ||
32 | value="`hal-system-sonypic getbluetooth`" | ||
33 | @@ -17,9 +24,9 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
34 | exit 1 | ||
35 | fi | ||
36 | exit ${value} | ||
37 | - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then | ||
38 | + elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then | ||
39 | # TODO: write our own binary that links with libsmbios? | ||
40 | - /usr/bin/dellWirelessCtl --st_bt | ||
41 | + $DELL_WCTL --st_bt | ||
42 | value=$? | ||
43 | if [ "$value" = "0" ]; then | ||
44 | exit 1 | ||
45 | @@ -35,9 +42,9 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
46 | exit 1 | ||
47 | fi | ||
48 | elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then | ||
49 | - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then | ||
50 | + if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then | ||
51 | # TODO: write our own binary that links with libsmbios? | ||
52 | - /usr/bin/dellWirelessCtl --st_wlan | ||
53 | + $DELL_WCTL --st_wlan | ||
54 | value=$? | ||
55 | if [ "$value" = "0" ]; then | ||
56 | exit 1 | ||
57 | diff --git a/tools/linux/hal-system-killswitch-set-power-linux b/tools/linux/hal-system-killswitch-set-power-linux | ||
58 | index 85a4548..2ef9ebe 100755 | ||
59 | --- a/tools/linux/hal-system-killswitch-set-power-linux | ||
60 | +++ b/tools/linux/hal-system-killswitch-set-power-linux | ||
61 | @@ -8,6 +8,13 @@ | ||
62 | # the Free Software Foundation; either version 2 of the License, or | ||
63 | # (at your option) any later version. | ||
64 | |||
65 | +if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then | ||
66 | + DELL_WCTL=/usr/bin/dellWirelessCtl | ||
67 | + if [ -x /usr/sbin/dellWirelessCtl ]; then | ||
68 | + DELL_WCTL=/usr/sbin/dellWirelessCtl | ||
69 | + fi | ||
70 | +fi | ||
71 | + | ||
72 | if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
73 | if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then | ||
74 | hal-system-sonypic setbluetooth $value | ||
75 | @@ -16,16 +23,16 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
76 | exit 1 | ||
77 | fi | ||
78 | exit 0 | ||
79 | - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then | ||
80 | + elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then | ||
81 | |||
82 | # As a side effect we disable the physical kill switch | ||
83 | |||
84 | # TODO: write our own binary that links with libsmbios? | ||
85 | if [ "$value" = "true" ]; then | ||
86 | - /usr/bin/dellWirelessCtl --sw_bt 0 --bt 1 | ||
87 | + $DELL_WCTL --sw_bt 0 --bt 1 | ||
88 | ret=$? | ||
89 | else | ||
90 | - /usr/bin/dellWirelessCtl --sw_bt 0 --bt 0 | ||
91 | + $DELL_WCTL --sw_bt 0 --bt 0 | ||
92 | ret=$? | ||
93 | fi | ||
94 | if [ "$ret" != "0" ]; then | ||
95 | @@ -38,16 +45,16 @@ if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then | ||
96 | exit 1 | ||
97 | fi | ||
98 | elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then | ||
99 | - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then | ||
100 | + if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then | ||
101 | |||
102 | # As a side effect we disable the physical kill switch | ||
103 | |||
104 | # TODO: write our own binary that links with libsmbios? | ||
105 | if [ "$value" = "true" ]; then | ||
106 | - /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 1 | ||
107 | + $DELL_WCTL --sw_wlan 0 --wlan 1 | ||
108 | ret=$? | ||
109 | else | ||
110 | - /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 0 | ||
111 | + $DELL_WCTL --sw_wlan 0 --wlan 0 | ||
112 | ret=$? | ||
113 | fi | ||
114 | if [ "$ret" != "0" ]; then | ||
115 | -- | ||
116 | 1.5.3.7 | ||
117 |