* [PATCH 0/2]acpid: make the initscript friendly to user
@ 2013-09-03 8:30 Bian Naimeng
2013-09-03 8:32 ` [PATCH 1/2]acpid: install events directory at default Bian Naimeng
2013-09-03 8:33 ` [PATCH 2/2]acpid: print message if rule directory is inexist Bian Naimeng
0 siblings, 2 replies; 3+ messages in thread
From: Bian Naimeng @ 2013-09-03 8:30 UTC (permalink / raw)
To: openembedded-core
At default, the ${sysconfdir}/acpi/events will be not installed,
but initscript depends on it while starting acpid daemon.
If rule directory "${sysconfdir}/acpi/events" 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.
The following patchs try to make the initscript friendly to user.
Bian Naimeng (2):
acpid: install events directory at default.
acpid: print message if rule directory is inexist.
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2]acpid: install events directory at default.
2013-09-03 8:30 [PATCH 0/2]acpid: make the initscript friendly to user Bian Naimeng
@ 2013-09-03 8:32 ` Bian Naimeng
2013-09-03 8:33 ` [PATCH 2/2]acpid: print message if rule directory is inexist Bian Naimeng
1 sibling, 0 replies; 3+ messages in thread
From: Bian Naimeng @ 2013-09-03 8:32 UTC (permalink / raw)
To: openembedded-core
acpid: install events directory at default.
If rule directory "${sysconfdir}/acpi/events" is inexist,
the acpid initscript will exit with success, but the daemon will be not running.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
---
meta/recipes-bsp/acpid/acpid.inc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-bsp/acpid/acpid.inc b/meta/recipes-bsp/acpid/acpid.inc
index 1ffe6ff..40293c5 100644
--- a/meta/recipes-bsp/acpid/acpid.inc
+++ b/meta/recipes-bsp/acpid/acpid.inc
@@ -27,4 +27,7 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
cat ${WORKDIR}/init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
+
+ install -d ${D}${sysconfdir}/acpi
+ install -d ${D}${sysconfdir}/acpi/events
}
--
1.7.7
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2]acpid: print message if rule directory is inexist
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
1 sibling, 0 replies; 3+ messages in thread
From: Bian Naimeng @ 2013-09-03 8:33 UTC (permalink / raw)
To: openembedded-core
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-03 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2]acpid: print message if rule directory is inexist Bian Naimeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox