From: Bian Naimeng <biannm@cn.fujitsu.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2]acpid: print message if rule directory is inexist
Date: Tue, 03 Sep 2013 16:33:55 +0800 [thread overview]
Message-ID: <52259EF3.8010404@cn.fujitsu.com> (raw)
In-Reply-To: <52259E35.4030405@cn.fujitsu.com>
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.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
---
meta/recipes-bsp/acpid/acpid/init | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-bsp/acpid/acpid/init b/meta/recipes-bsp/acpid/acpid/init
index ef08b59..9f2c0d4 100755
--- a/meta/recipes-bsp/acpid/acpid/init
+++ b/meta/recipes-bsp/acpid/acpid/init
@@ -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: "
--
1.7.7
prev parent reply other threads:[~2013-09-03 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 8:30 [PATCH 0/2]acpid: make the initscript friendly to user Bian Naimeng
2013-09-03 8:32 ` [PATCH 1/2]acpid: install events directory at default Bian Naimeng
2013-09-03 8:33 ` Bian Naimeng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52259EF3.8010404@cn.fujitsu.com \
--to=biannm@cn.fujitsu.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox