OBS User unknown 2008-06-23 00:06:29 +00:00 committed by Git OBS Bridge
parent 00c435b01f
commit 4f76b7aa63
4 changed files with 40 additions and 10 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Sun Jun 8 18:01:52 CEST 2008 - hmacht@suse.de
- minor fixes to the thinkpad_handler script (bnc#371927)
-------------------------------------------------------------------
Fri Jun 6 12:34:11 CEST 2008 - hmacht@suse.de
- add script for enabling/disabling bluetooth via hotkey on
Thinkpads (bnc#371927)
-------------------------------------------------------------------
Tue May 20 17:31:51 CEST 2008 - thoenig@suse.de

View File

@ -14,7 +14,7 @@
Name: acpid
Url: http://acpid.sourceforge.net/
Version: 1.0.6
Release: 61
Release: 65
%define acpi_version 0.09
License: GPL v2 or later
Group: System/Daemons
@ -28,6 +28,7 @@ Source2: rcacpid
Source3: README.SuSE
Source4: thinkpad_acpi.modprobe
Source5: events.default
Source6: thinkpad_handler
Patch1: acpi_%{acpi_version}.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ia64
@ -54,7 +55,7 @@ Authors:
%patch1
pushd acpi-%{acpi_version}
popd
cp %{S:2} %{S:3} %{S:4} %{S:5} .
cp %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} .
%build
make EXTRA_CFLAGS="$RPM_OPT_FLAGS -DUSE_SYSLOG"
@ -68,6 +69,7 @@ popd
make install INSTPREFIX=%{buildroot} SBINDIR=%{buildroot}/sbin
install -Dm 744 rcacpid %{buildroot}/etc/init.d/acpid
install -Dm 644 thinkpad_acpi.modprobe %{buildroot}/etc/modprobe.d/thinkpad_acpi
install -Dm 744 thinkpad_handler %{buildroot}/usr/lib/acpid/thinkpad_handler
mkdir -p %{buildroot}/usr/sbin
ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid
install -Dm 644 events.default %{buildroot}/etc/acpi/events/default
@ -101,6 +103,7 @@ rm -rf %{buildroot}
%dir /etc/acpi
%dir /etc/acpi/events
/etc/acpi/events/default
/usr/lib/acpid
/etc/init.d/acpid
/etc/modprobe.d/thinkpad_acpi
/usr/sbin/rcacpid
@ -114,6 +117,11 @@ rm -rf %{buildroot}
%ghost %config(noreplace,missingok) %_var/log/acpid
%changelog
* Sun Jun 08 2008 hmacht@suse.de
- minor fixes to the thinkpad_handler script (bnc#371927)
* Fri Jun 06 2008 hmacht@suse.de
- add script for enabling/disabling bluetooth via hotkey on
Thinkpads (bnc#371927)
* Tue May 20 2008 thoenig@suse.de
- The game is not over yet: Re-introduce hotkey mask for
thinkpad_acpi.modprobe (bnc#369535, bnc#382343)

View File

@ -1,9 +1,4 @@
# This is a dummy config file to avoid
# that acpid processes any ACPI events.
#
# This should be the default configuration
# as the acpid should only serve to forward
# ACPI events.
# forward acpi events to the appropriate scripts
# Other programs such as powersaved or special key
# handler programs should process ACPI events
event=ibm/.*
action=/usr/lib/acpid/thinkpad_handler "%e"

16
thinkpad_handler Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
HOTKEY=$1
set $HOTKEY
EVENT=$1 # "ibm/hotkey"
ACPI=$2 # "HOTK"
WHAT=$3 # "00000080"
SERIAL=$4 # "0000100c" Fn+F12
# bluetooth
if [ "$WHAT" = "00000080" -a "$SERIAL" = "00001005" ]; then
ACTION="disable"
grep -q "disabled" "/proc/acpi/ibm/bluetooth" && ACTION="enable"
echo $ACTION > "/proc/acpi/ibm/bluetooth"
fi