From b2a2a522d01aacd4b4940ac2d097cfe981d4a0ab Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Sep 10 2010 13:28:49 +0000 Subject: * Fri Sep 03 2010 Jiri Skala - 2.0.5-3 - fixed #629740 - acpid doesn't fork, but systemd unit file claims otherwise --- diff --git a/acpid-2.0.5-forking.patch b/acpid-2.0.5-forking.patch new file mode 100644 index 0000000..82f2558 --- /dev/null +++ b/acpid-2.0.5-forking.patch @@ -0,0 +1,12 @@ +diff -up acpid-2.0.5/acpid.c.forking acpid-2.0.5/acpid.c +--- acpid-2.0.5/acpid.c.forking 2010-03-28 15:54:23.000000000 +0200 ++++ acpid-2.0.5/acpid.c 2010-09-10 13:38:06.207131183 +0200 +@@ -333,7 +333,7 @@ daemonize(void) + pid_t pid, sid; + + /* already a daemon */ +- if ( getppid() == 1 ) return 0; ++ //if ( getppid() == 1 ) return 0; + + /* fork off the parent process */ + pid = fork(); diff --git a/acpid.service b/acpid.service index 144997a..4b2dbed 100644 --- a/acpid.service +++ b/acpid.service @@ -2,16 +2,9 @@ Description=ACPI Event Daemon After=syslog.target -# This could probably benefit from socket activation, but honestly I think it -# is time for acpid to go away, and hence I am not planning to spend the time -# to add socket activation here. We use Type=forking to ensure that the -# communication sockets are in place before boot proceeds with any service -# needing this service. Would acpid support socket activation we could use -# Type=simple here. - [Service] -Type=forking -ExecStart=/usr/sbin/acpid +Type=simple +ExecStart=/usr/sbin/acpid -f [Install] WantedBy=multi-user.target diff --git a/acpid.spec b/acpid.spec index 7ef0d36..91d2f96 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ Summary: ACPI Event Daemon Name: acpid Version: 2.0.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons Source: http://tedfelix.com/linux/acpid-%{version}.tar.gz @@ -12,6 +12,7 @@ Source4: acpid.power.sh Source5: acpid.service Patch1: acpid-2.0.2-makefile.patch +Patch2: acpid-2.0.5-forking.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: ia64 x86_64 %{ix86} @@ -19,7 +20,7 @@ URL: http://tedfelix.com/linux/acpid-netlink.html Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service -Requires: systemd-units +#Requires: systemd-units %description @@ -30,6 +31,7 @@ acpid is a daemon that dispatches ACPI events to user-space programs. %setup -q %patch1 -p1 -b .makefile +%patch2 -p1 -b .forking %build make %{?_smp_mflags} @@ -110,6 +112,9 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Fri Sep 03 2010 Jiri Skala - 2.0.5-3 +- fixed #629740 - acpid doesn't fork, but systemd unit file claims otherwise + * Wed Aug 11 2010 Jiri Skala - 2.0.5-2 - fixes #617317 - Providing native systemd file for upcoming F14 Feature Systemd