summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Tollerton <rich.tollerton@ni.com>2014-07-22 15:23:35 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-23 21:59:17 +0100
commit8076ab295a764fd4aa83c025a8c5deda0549a5c7 (patch)
treed4324e707f88d6802deeb71a134e866ad0967a7a
parent48641d57d478c682398e6135c659be93fafd9f0b (diff)
downloadpoky-8076ab295a764fd4aa83c025a8c5deda0549a5c7.tar.gz
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". (From OE-Core rev: 5c22973e1bf76615bcf57984ac7a30cf7d0766df) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-core/sysvinit/sysvinit/bootlogd.init4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index 06af465a5b..df5aa430cf 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -63,8 +63,8 @@ case "$ACTION" in
63 [ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: " 63 [ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
64 start-stop-daemon --stop --quiet --exec $DAEMON 64 start-stop-daemon --stop --quiet --exec $DAEMON
65 65
66 if [ "$STOPPER" ] && [ -f /var/log/boot ] && \ 66 if [ "$STOPPER" ] && [ "$(which savelog 2>/dev/null)" ] && \
67 [ -f /var/log/boot~ ] 67 [ -f /var/log/boot ] && [ -f /var/log/boot~ ]
68 then 68 then
69 cd /var/log 69 cd /var/log
70 chgrp adm boot 70 chgrp adm boot