acpid: print message if rule directory is inexist

acpid: print message if rule directory is inexist

If rule directory is inexist, the acpid initscript will exit with success,
but the daemon will be not running.
Print message in this case to tell user that the daemon is not running.

(From OE-Core rev: 66a5d15cecdf4bd267dbae5f771ebf3768232481)

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Bian Naimeng 2013-09-03 16:33:55 +08:00 committed by Richard Purdie
parent f438140029
commit 18dfcc5139
1 changed files with 6 additions and 2 deletions

View File

@ -6,8 +6,12 @@ test -d /proc/acpi || exit 0
case "$1" in
start)
echo -n "Starting Advanced Configuration and Power Interface daemon: "
start-stop-daemon -S -x /usr/sbin/acpid -- -c /etc/acpi/events
echo "acpid."
if [ ! -d /etc/acpi/events ]; then
echo "There is not any rule configuration file."
else
start-stop-daemon -S -x /usr/sbin/acpid -- -c /etc/acpi/events
echo "acpid."
fi
;;
stop)
echo -n "Stopping Advanced Configuration and Power Interface daemon: "