From: Stefan Schantl Date: Fri, 8 Apr 2011 20:43:40 +0000 (+0200) Subject: acpid: Add systemd unit file. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d7556c7e01c729b8e809f96ce28b6c624129d06;p=ipfire-3.x.git acpid: Add systemd unit file. References #153. --- diff --git a/pkgs/acpid/acpid.init b/pkgs/acpid/acpid.init deleted file mode 100644 index 111bf479c..000000000 --- a/pkgs/acpid/acpid.init +++ /dev/null @@ -1,8 +0,0 @@ -description "Start the ACPI daemon" -author "IPFire Team" - -start on stopped mountfs -stop on kill-all-services - -exec /usr/sbin/acpid -f -respawn diff --git a/pkgs/acpid/acpid.nm b/pkgs/acpid/acpid.nm index e0543c2b5..876aa2598 100644 --- a/pkgs/acpid/acpid.nm +++ b/pkgs/acpid/acpid.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include PKG_NAME = acpid PKG_VER = 2.0.8 -PKG_REL = 1 +PKG_REL = 2 PKG_MAINTAINER = PKG_GROUPS = Base System/Daemons diff --git a/pkgs/acpid/power.sh b/pkgs/acpid/power.sh index c279e4c8e..4fb9ae03c 100755 --- a/pkgs/acpid/power.sh +++ b/pkgs/acpid/power.sh @@ -1,4 +1,4 @@ #!/bin/sh # Shutdown the system immediately -initctl emit shutdown +shudown -h now diff --git a/pkgs/acpid/systemd/acpid.service b/pkgs/acpid/systemd/acpid.service new file mode 100644 index 000000000..553b3e2ff --- /dev/null +++ b/pkgs/acpid/systemd/acpid.service @@ -0,0 +1,18 @@ +[Unit] +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 +EnvironmentFile=/etc/sysconfig/acpid +ExecStart=/usr/sbin/acpid $OPTIONS + +[Install] +WantedBy=multi-user.target