acpid: make the initscript friendly to user
cover acpid: make the initscript friendly to user
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.
PATCH 1/2 acpid: install events directory at default.
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.
--- meta/recipes-bsp/acpid/acpid.inc | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/recipes-bsp/acpid/acpid.inc +3 -0
@@ -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 }
Signature · 1 line
1.7.7
PATCH 2/2 acpid: print message if rule directory is inexist
In reply to Bian Naimengacpid: 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.
--- meta/recipes-bsp/acpid/acpid/init | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
meta/recipes-bsp/acpid/acpid/init +6 -2
@@ -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: "
Signature · 1 line
1.7.7