Fixed init script
This commit is contained in:
parent
76c0dde904
commit
3fc8732a64
24
acpid.init
24
acpid.init
@ -28,19 +28,21 @@ RETVAL=0
|
|||||||
#
|
#
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
# Check if acpid is executable
|
|
||||||
if [ ! -x /usr/sbin/acpid ]; then
|
|
||||||
logger -p daemon.error -t $0 "/usr/sbin/acpid is not executable."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Check for kernel support
|
|
||||||
if [ ! -f /proc/acpi/event ]; then
|
|
||||||
logger -p daemon.error -t $0 "need ACPI_PROC_EVENT support in kernel."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# 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: "
|
echo -n $"Starting acpi daemon: "
|
||||||
|
# Check if acpid is executable
|
||||||
|
if [ ! -x /usr/sbin/acpid ]; then
|
||||||
|
logger -p daemon.error -t $0 "/usr/sbin/acpid is not executable."
|
||||||
|
echo_failure
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Check for kernel support
|
||||||
|
if [ ! -f /proc/acpi/event ]; then
|
||||||
|
logger -p daemon.error -t $0 "need ACPI_PROC_EVENT support in kernel."
|
||||||
|
echo_failure
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user