From c8305d566021b18f02d1479b6697406874adb448 Mon Sep 17 00:00:00 2001 From: Henry Yei <hyei@mvista.com> Date: Wed, 16 Mar 2011 22:08:17 +0100 Subject: [PATCH] bootchartd: Expect dmesg log only if bootchartd run as init The bootchartd script attempts to archive the dmesg log in all cases, however the dmesg log is only dumped when bootchartd is being run as the init process. This patch adds conditional logic to only expect the dmesg log when it is supposed to be generated. --- bootchartd.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/bootchartd.in b/bootchartd.in index 6bea753..ebe9d8b 100755 --- a/bootchartd.in +++ b/bootchartd.in @@ -123,7 +123,12 @@ stop() fi # Archive it all up into the bootchart output - tar -zcf "$BOOTLOG_DEST" header dmesg *.log + # expect dmesg log only if bootchartd was started as an init process + if [ -n "$INIT_PROCESS" ] ; then + tar -zcf "$BOOTLOG_DEST" header dmesg *.log + else + tar -zcf "$BOOTLOG_DEST" header *.log + fi rm -Rf $tmpdir