]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
acpid: Add systemd unit file.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 8 Apr 2011 20:43:40 +0000 (22:43 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 8 Apr 2011 20:43:40 +0000 (22:43 +0200)
References #153.

pkgs/acpid/acpid.init [deleted file]
pkgs/acpid/acpid.nm
pkgs/acpid/power.sh
pkgs/acpid/systemd/acpid.service [new file with mode: 0644]

diff --git a/pkgs/acpid/acpid.init b/pkgs/acpid/acpid.init
deleted file mode 100644 (file)
index 111bf47..0000000
+++ /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
index e0543c2b5a835f03f8c848746c4c6b2be3dc5ef3..876aa25980625c3fde9f6896e2d0a3553e3cf7ab 100644 (file)
@@ -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
index c279e4c8ed2c0ce432188a3cfe9c453ceb8e7b03..4fb9ae03c218ef658ed9f043a71ff02903c4a97b 100755 (executable)
@@ -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 (file)
index 0000000..553b3e2
--- /dev/null
@@ -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