xrmx / bootchart

merge of bootchart-collector and pybootchartgui
GNU General Public License v2.0
233 stars 88 forks source link

bootchartd fails to create bootchart.tgz when run from command line because it expects dmesg log #24

Closed hyei closed 13 years ago

hyei commented 13 years ago

When running bootchartd from the command line, and then stopping bootchartd, tar fails to find the dmesg log because it is not being dumped when bootchartd is being run as a non-init process. The bootchart.tgz archive is not created in this case.

I have created a patch that seems to do the job:

From: Henry Yei hyei@mvista.com Date: Tue, 15 Mar 2011 18:20:43 -0700 Subject: [PATCH] expect dmesg log only if bootchartd run as init

Source: MontaVista Software, LLC MR: 43117 Type: Defect Fix Disposition: Needs submitting to bootchart2

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.

Signed-off-by: Henry Yei hyei@mvista.com

bootchartd.in | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/bootchartd.in b/bootchartd.in index a16b07d..bf366d5 100755 --- a/bootchartd.in +++ b/bootchartd.in @@ -123,7 +123,12 @@ stop() fi

    # Archive it all up into the bootchart output
xrmx commented 13 years ago

Applied, thanks. Next time if you can please post a git url to pull or an url where the patch can be downloaded.