[oe-commits] Richard Tollerton : sysvinit: bootlogd: Don't run savelog if it' s not installed
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 23 21:08:51 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 5c22973e1bf76615bcf57984ac7a30cf7d0766df
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5c22973e1bf76615bcf57984ac7a30cf7d0766df
Author: Richard Tollerton <rich.tollerton at ni.com>
Date: Tue Jul 22 15:23:35 2014 -0500
sysvinit: bootlogd: Don't run savelog if it's not installed
bootlogd's default log rotation code on stop requires `savelog`, which
is in debianutils, which may not be installed. If it's not installed,
don't try to perform the log rotation.
That is: in the affected code block, `savelog` is what is responsible
for creating "boot.0". When `savelog` doesn't exist, an error message
gets printed on bootup to the effect of "mv: can't find boot.0".
Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
Signed-off-by: Ben Shelton <ben.shelton at ni.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index 06af465..df5aa43 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -63,8 +63,8 @@ case "$ACTION" in
[ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
- if [ "$STOPPER" ] && [ -f /var/log/boot ] && \
- [ -f /var/log/boot~ ]
+ if [ "$STOPPER" ] && [ "$(which savelog 2>/dev/null)" ] && \
+ [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
then
cd /var/log
chgrp adm boot
More information about the Openembedded-commits
mailing list