b5f57930ad
Wed Oct 22 2003 Bill Nottingham <notting@redhat.com> 1.0.2-5 - fix handling of sample.conf (#107160) - mark for translations (#107459) Sun Oct 19 2003 Florian La Roche <Florian.LaRoche@redhat.de> - add %clean specfile target Wed Oct 01 2003 Bill Nottingham <notting@redhat.com> 1.0.2-3 - re-enable x86 - don't load the button module Thu Aug 07 2003 Bill Nottingham <notting@redhat.com> 1.0.2-2 - no x86 for now Mon Jul 07 2003 Bill Nottingham <notting@redhat.com> 1.0.2-1 - update to 1.0.2
82 lines
1.1 KiB
Bash
Executable File
82 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# /etc/rc.d/init.d/acpid
|
|
#
|
|
# Starts the acpi daemon
|
|
#
|
|
# chkconfig: 345 44 56
|
|
# description: Listen and dispatch ACPI events from the kernel
|
|
# processname: acpid
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
[ -x /usr/sbin/acpid ] || exit 0
|
|
[ -f /proc/acpi/event ] || exit 0
|
|
|
|
RETVAL=0
|
|
|
|
#
|
|
# See how we were called.
|
|
#
|
|
|
|
start() {
|
|
# Check if it is already running
|
|
if [ ! -f /var/lock/subsys/acpid ]; then
|
|
echo -n $"Starting acpi daemon: "
|
|
daemon /usr/sbin/acpid
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid
|
|
echo
|
|
fi
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
echo -n $"Stopping acpi daemon: "
|
|
killproc /usr/sbin/acpid
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/acpid
|
|
echo
|
|
return $RETVAL
|
|
}
|
|
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
reload() {
|
|
trap "" SIGHUP
|
|
killall -HUP acpid
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
reload)
|
|
reload
|
|
;;
|
|
restart)
|
|
restart
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/acpid ]; then
|
|
restart
|
|
fi
|
|
;;
|
|
status)
|
|
status acpid
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|