Fixed initscript

This commit is contained in:
Zdenek Prikryl 2007-10-23 15:05:39 +00:00
parent 3fc8732a64
commit 77df738425

View File

@ -30,19 +30,17 @@ RETVAL=0
start() { start() {
# Check if it is already running # Check if it is already running
if [ ! -f /var/lock/subsys/acpid ]; then if [ ! -f /var/lock/subsys/acpid ]; then
echo -n $"Starting acpi daemon: "
# Check if acpid is executable # Check if acpid is executable
if [ ! -x /usr/sbin/acpid ]; then if [ ! -x /usr/sbin/acpid ]; then
logger -p daemon.error -t $0 "/usr/sbin/acpid is not executable." logger -p daemon.error -t $0 "/usr/sbin/acpid is not executable."
echo_failure
exit 1 exit 1
fi fi
# Check for kernel support # Check for kernel support
if [ ! -f /proc/acpi/event ]; then if [ ! -f /proc/acpi/event ]; then
logger -p daemon.error -t $0 "need ACPI_PROC_EVENT support in kernel." logger -p daemon.error -t $0 "need ACPI_PROC_EVENT support in kernel."
echo_failure
exit 1 exit 1
fi fi
echo -n $"Starting acpi daemon: "
daemon /usr/sbin/acpid $@ daemon /usr/sbin/acpid $@
RETVAL=$? RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid [ $RETVAL -eq 0 ] && touch /var/lock/subsys/acpid