Accepting request 177670 from Base:System
- Also remove After=syslog.target from unit file (target does not exists anymore) - 2.0.19 release - README improvements (README) (Ted Felix) - man page additions (acpid.8) (Ted Felix) (kacpimon/libnetlink.c) (Ted Felix) - Add support for mic mute (KEY_MICMUTE). (input_layer.c) (Ted Felix) - Fix format of video/tabletmode event string. CRITICAL. (input_layer.c) (Ted Felix) - Add how to kill acpid to kacpimon man page. (kacpimon.8) (Ted Felix) - Add info on logind.conf's HandlePowerKey to man page. (acpid.8) (Ted Felix) - Remove ExecStop from systemd unit, not required. (forwarded request 177314 from elvigia) OBS-URL: https://build.opensuse.org/request/show/177670 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/acpid?expand=0&rev=62
This commit is contained in:
commit
61e1052afd
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:36b7d2c7deb6a44ae87b28026ff368f96e66b3ee8dd6b6cef4de2c3dbea17a3e
|
||||
size 149440
|
3
acpid-2.0.19.tar.xz
Normal file
3
acpid-2.0.19.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce503bf3f36002b45a465dc8a2490c16c553abd5bc2c1c8ece86247ec281dcde
|
||||
size 150972
|
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 02:21:33 UTC 2013 - crrodriguez@opensuse.org
|
||||
|
||||
- Also remove After=syslog.target from unit file (target does
|
||||
not exists anymore)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 02:12:39 UTC 2013 - crrodriguez@opensuse.org
|
||||
|
||||
- 2.0.19 release
|
||||
- README improvements (README) (Ted Felix)
|
||||
- man page additions (acpid.8) (Ted Felix)
|
||||
(kacpimon/libnetlink.c) (Ted Felix)
|
||||
- Add support for mic mute (KEY_MICMUTE).
|
||||
(input_layer.c) (Ted Felix)
|
||||
- Fix format of video/tabletmode event string. CRITICAL.
|
||||
(input_layer.c) (Ted Felix)
|
||||
- Add how to kill acpid to kacpimon man page.
|
||||
(kacpimon.8) (Ted Felix)
|
||||
- Add info on logind.conf's HandlePowerKey to man page.
|
||||
(acpid.8) (Ted Felix)
|
||||
|
||||
- Remove ExecStop from systemd unit, not required.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 15 15:29:10 UTC 2013 - trenn@suse.de
|
||||
|
||||
- Catch and process sleep event correctly, even if no X is
|
||||
running.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 23 04:00:57 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
[Unit]
|
||||
Description=ACPI Event Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
|
||||
ExecStart=/usr/sbin/acpid -n -f
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
ExecStop=/bin/kill -s QUIT $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
14
acpid.spec
14
acpid.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package acpid
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: acpid
|
||||
Version: 2.0.17
|
||||
Version: 2.0.19
|
||||
Release: 0
|
||||
Summary: Executes Actions at ACPI Events
|
||||
License: GPL-2.0+
|
||||
@ -28,10 +28,13 @@ Source2: rcacpid
|
||||
Source3: README.SuSE
|
||||
Source4: thinkpad_acpi.modprobe
|
||||
Source5: events.power_button
|
||||
Source9: events.thinkpad
|
||||
Source6: thinkpad_handler
|
||||
Source7: power_button
|
||||
Source8: acpid.service
|
||||
Source9: events.thinkpad
|
||||
Source10: events.sleep_button
|
||||
Source11: sleep_button
|
||||
|
||||
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||
Patch1: acpid-makefile.patch
|
||||
BuildRequires: systemd
|
||||
@ -54,7 +57,7 @@ Configure it in /etc/sysconfig/powermanagement.
|
||||
%setup -q
|
||||
%patch1
|
||||
|
||||
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} .
|
||||
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} .
|
||||
|
||||
%build
|
||||
export LDFLAGS="-Wl,-z,relro,-z,now"
|
||||
@ -67,9 +70,11 @@ install -Dm 744 rcacpid %{buildroot}%{_initddir}/acpid
|
||||
install -Dm 644 thinkpad_acpi.modprobe %{buildroot}%{_sysconfdir}/modprobe.d/50-thinkpad_acpi.conf
|
||||
install -Dm 744 thinkpad_handler %{buildroot}%{_prefix}/lib/acpid/thinkpad_handler
|
||||
install -Dm 744 power_button %{buildroot}%{_prefix}/lib/acpid/power_button
|
||||
install -Dm 744 sleep_button %{buildroot}%{_prefix}/lib/acpid/sleep_button
|
||||
mkdir -p %{buildroot}%{_prefix}/sbin
|
||||
ln -sf ../../etc/init.d/acpid %{buildroot}%{_sbindir}/rcacpid
|
||||
install -Dm 644 events.power_button %{buildroot}%{_sysconfdir}/acpi/events/power_button
|
||||
install -Dm 644 events.sleep_button %{buildroot}%{_sysconfdir}/acpi/events/sleep_button
|
||||
install -Dm 644 events.thinkpad %{buildroot}%{_sysconfdir}/acpi/events/thinkpad
|
||||
mkdir -p %{buildroot}/%{_unitdir}
|
||||
install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir}
|
||||
@ -103,6 +108,7 @@ touch %{buildroot}%{_localstatedir}/log/acpid
|
||||
%dir %{_sysconfdir}/acpi/events
|
||||
%{_sysconfdir}/acpi/events/thinkpad
|
||||
%{_sysconfdir}/acpi/events/power_button
|
||||
%{_sysconfdir}/acpi/events/sleep_button
|
||||
%{_prefix}/lib/acpid
|
||||
%{_sysconfdir}/init.d/acpid
|
||||
%{_sysconfdir}/modprobe.d/50-thinkpad_acpi.conf
|
||||
|
5
events.sleep_button
Normal file
5
events.sleep_button
Normal file
@ -0,0 +1,5 @@
|
||||
# handle sleep button event
|
||||
|
||||
event=button/sleep.*
|
||||
action=/usr/lib/acpid/sleep_button
|
||||
|
42
sleep_button
Normal file
42
sleep_button
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Sleep button suspend script, adapted from
|
||||
# /usr/lib/acpid/power_button
|
||||
#
|
||||
# Copyright (C) 2008 Holger Macht <hmacht@suse.de>
|
||||
#
|
||||
# This file is released under the GPLv2.
|
||||
#
|
||||
|
||||
EXEC=/usr/sbin/pm-suspend
|
||||
|
||||
# iterate over all sessions. If a active X session is found, do nothing
|
||||
while read A; do
|
||||
SESSION=`echo $A | sed 's/\(Session[0-9]*\)://g'`
|
||||
[ -z "$SESSION" ] || continue
|
||||
|
||||
SESSION=`echo $A | sed 's/\(Session[0-9]*\):/\1/g'`
|
||||
IS_X=`dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \
|
||||
/org/freedesktop/ConsoleKit/$SESSION \
|
||||
org.freedesktop.ConsoleKit.Session.GetX11Display`
|
||||
|
||||
# check if this is a X session, if not, go on
|
||||
DISP=`echo $IS_X | sed -e 's/^.* string "\(.*\)"/\1/'`
|
||||
[ -n "$DISP" ] || continue
|
||||
|
||||
IS_ACTIVE=`dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \
|
||||
/org/freedesktop/ConsoleKit/$SESSION \
|
||||
org.freedesktop.ConsoleKit.Session.IsActive`
|
||||
IS_ACTIVE=`echo $IS_ACTIVE | sed -e 's/^.* boolean \(.*\)$/\1/'`
|
||||
|
||||
if [ "$IS_ACTIVE" = "true" -a -n "$DISP" ]; then
|
||||
# additional check, if none of these two apps are running, go on
|
||||
if [ -n "`pidof kpowersave`" -o -n "`pidof gnome-power-manager`" -o -n "`pidof kded4`" -o -n "`pidof dalston-power-applet`" -o -n "`pidof gnome-settings-daemon`" ]; then
|
||||
echo doing nothing...
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
done < <(ck-list-sessions)
|
||||
|
||||
logger -s "Sleep Button event received, running $EXEC."
|
||||
$EXEC
|
Loading…
x
Reference in New Issue
Block a user