aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d/init.d/acpid
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/init.d/acpid')
-rwxr-xr-xetc/rc.d/init.d/acpid58
1 files changed, 58 insertions, 0 deletions
diff --git a/etc/rc.d/init.d/acpid b/etc/rc.d/init.d/acpid
new file mode 100755
index 00000000..0531670d
--- /dev/null
+++ b/etc/rc.d/init.d/acpid
@@ -0,0 +1,58 @@
+#!/bin/sh
+########################################################################
+# Begin acpid
+#
+# Description : ACPI event daemon boot script
+#
+# Author : Igor Živković <[email protected]>
+#
+# Version : BLFS 8.0
+#
+########################################################################
+
+### BEGIN INIT INFO
+# Provides: acpid
+# Required-Start:
+# Should-Start: $syslog
+# Required-Stop:
+# Should-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts Advanced Configuration and Power Interface event daemon
+# X-LFS-Provided-By: BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "$1" in
+ start)
+ log_info_msg "Starting ACPI event daemon..."
+ start_daemon /usr/sbin/acpid
+ sleep 1
+ pidofproc -p "/run/acpid.pid" > /dev/null
+ evaluate_retval
+ ;;
+
+ stop)
+ log_info_msg "Stopping ACPI event daemon..."
+ killproc -p "/run/acpid.pid" /usr/sbin/acpid
+ evaluate_retval
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ status)
+ statusproc /usr/sbin/acpid
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End acpid