rpms/acpid/devel acpid.init,1.2,1.3 acpid.spec,1.19,1.20
Zdenek Prikryl (zprikryl)
fedora-extras-commits at redhat.com
Wed Jul 25 09:00:19 UTC 2007
Author: zprikryl
Update of /cvs/extras/rpms/acpid/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14446
Modified Files:
acpid.init acpid.spec
Log Message:
Fixed init script to comply with LSB standard
Index: acpid.init
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- acpid.init 9 Sep 2004 02:52:56 -0000 1.2
+++ acpid.init 25 Jul 2007 08:59:47 -0000 1.3
@@ -8,12 +8,19 @@
# description: Listen and dispatch ACPI events from the kernel
# processname: acpid
+### BEGIN INIT INFO
+# Provides: acpid
+# Required-Start: $syslog
+# Required-Stop: $syslog
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: start and stop acpid
+# Description: Listen and dispatch ACPI events from the kernel
+### END INIT INFO
+
# Source function library.
. /etc/rc.d/init.d/functions
-[ -x /usr/sbin/acpid ] || exit 0
-[ -f /proc/acpi/event ] || exit 0
-
RETVAL=0
#
@@ -21,6 +28,16 @@
#
start() {
+ # Check if acpid is executable
+ if [ ! -x /usr/sbin/acpid ]; then
+ echo "$0: acpid is not executable."
+ exit 1
+ fi
+ # Check for kernel support
+ if [ ! -f /proc/acpi/event ]; then
+ echo "$0: need ACPI support in kernel."
+ exit 1
+ fi
# Check if it is already running
if [ ! -f /var/lock/subsys/acpid ]; then
echo -n $"Starting acpi daemon: "
@@ -38,7 +55,7 @@
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/acpid
echo
- return $RETVAL
+ return $RETVAL
}
@@ -49,7 +66,9 @@
reload() {
trap "" SIGHUP
- killall -HUP acpid
+ action $"Reloading acpi daemon:" killall -HUP acpid
+ RETVAL=$?
+ return $RETVAL
}
case "$1" in
@@ -62,6 +81,10 @@
reload)
reload
;;
+force-reload)
+ echo "$0: Unimplemented feature."
+ RETVAL=3
+ ;;
restart)
restart
;;
@@ -72,10 +95,11 @@
;;
status)
status acpid
+ RETVAL=$?
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
+ RETVAL=2
esac
exit $RETVAL
Index: acpid.spec
===================================================================
RCS file: /cvs/extras/rpms/acpid/devel/acpid.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- acpid.spec 14 Feb 2007 13:01:46 -0000 1.19
+++ acpid.spec 25 Jul 2007 08:59:47 -0000 1.20
@@ -1,7 +1,7 @@
Summary: ACPI Event Daemon
Name: acpid
Version: 1.0.4
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPL
Group: System Environment/Daemons
Source: http://prdownloads.sourceforge.net/acpid/acpid-%{version}.tar.gz
@@ -87,6 +87,10 @@
fi
%changelog
+* Wed Jul 25 2007 Zdenek Prikryl <zprikryl at redhat.com> - 1.0.4-8.fc8
+- Fixed init script to comply with LSB standard
+- Resolves: #237754
+
* Wed Feb 14 2007 Phil Knirsch <pknirsch at redhat.com> - 1.0.4-7.fc7
- Dropped /var/log/acpid ownership as per review (225237)
More information about the fedora-extras-commits
mailing list