Bug#468962: bootchart: allow temp logging dir to be configurable
On Monday 03 March 2008 09:56:20 Jörg Sommer wrote: By the way I can change mktemp to use the environment variable TMPDIR. So you can change set a different directory with “export TMPDIR=/foo” if you like. That would be ok, dunno if I'd use that from the initramfs, it would require interaction. Why? If you write BOOTLOG_DIR or TMPDIR into bootchartd.conf, where's the difference? Both are not as optimal as what you've provided in the packages below, which work great. I was able to render an informative graph of what was going on during boot for the first time ;-) Can you test these packages? http://alioth.debian.org/~jo-guest/debian/bootchart_0.10~svn407-3_all.deb http://alioth.debian.org/~jo-guest/debian/bootchart-view_0.10~svn407-3_all.deb Bye, Jörg. Thanks, Kel.
Bug#468962: bootchart: allow temp logging dir to be configurable
Package: bootchart Version: 0.10~svn407-1 Severity: wishlist Hi, Please could you accept this patch to allow the hardcoded path of /tmp for temporary data to be changed. I have found that stuff in /tmp is prone to being cleaned by various initscripts. Thanks, Kel. diff -Nrup bootchart-0.10~svn407/script/bootchartd bootchart-0.10~svn407.log_dir/script/bootchartd --- bootchart-0.10~svn407/script/bootchartd 2008-03-03 02:05:56.0 +1000 +++ bootchart-0.10~svn407.log_dir/script/bootchartd 2008-03-03 02:05:24.0 +1000 @@ -23,6 +23,9 @@ VERSION=0.8 # Lock file BOOTLOG_LOCK=.lock +# Base temp dir +BOOTLOG_DIR=/tmp + # Read configuration. CONF=/etc/bootchartd.conf if [ -f $PWD/bootchartd.conf ]; then @@ -47,7 +50,7 @@ start() # boot), a tmpfs is mounted in /mnt. The mount point is immediately # released using a lazy umount, so the script must never leave that # directory. - LOG_DIR=$( mktemp -d /tmp/bootchart.XX 2/dev/null ) + LOG_DIR=$( mktemp -d ${BOOTLOG_DIR}/bootchart.XX 2/dev/null ) if [ -z $LOG_DIR ]; then LOG_DIR=/mnt LAZY_UMOUNT=yes diff -Nrup bootchart-0.10~svn407/script/bootchartd.conf bootchart-0.10~svn407.log_dir/script/bootchartd.conf --- bootchart-0.10~svn407/script/bootchartd.conf2008-03-03 02:05:56.0 +1000 +++ bootchart-0.10~svn407.log_dir/script/bootchartd.conf2008-03-03 02:03:44.0 +1000 @@ -18,6 +18,9 @@ PROCESS_ACCOUNTING=no # Tarball for the various boot log files BOOTLOG_DEST=/var/log/bootchart.tgz +# Directory in which temporary data is stored during boot process +BOOTLOG_DIR=/tmp + # Whether to automatically stop logging as the boot process completes. # The logger will look for known processes that indicate bootup completion # at a specific runlevel (e.g. gdm-binary, mingetty, etc.).
Bug#468962: bootchart: allow temp logging dir to be configurable
Hello Kel, Kel Modderman schrieb am Mon 03. Mar, 02:14 (+1000): Package: bootchart Version: 0.10~svn407-1 Severity: wishlist I have found that stuff in /tmp is prone to being cleaned by various initscripts. You're right. But I think it shouldn't be an option. We should use a different directory than /tmp, always. By the way I can change mktemp to use the environment variable TMPDIR. So you can change set a different directory with “export TMPDIR=/foo” if you like. Bye, Jörg. -- Geld allein macht nicht glücklich, aber es ist besser in einem Taxi zu weinen, als in der Straßenbahn. (Marcel Reich‐Ranicki) signature.asc Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP
Bug#468962: bootchart: allow temp logging dir to be configurable
hi Jörg, On Monday 03 March 2008 04:16:19 Jörg Sommer wrote: Hello Kel, Kel Modderman schrieb am Mon 03. Mar, 02:14 (+1000): Package: bootchart Version: 0.10~svn407-1 Severity: wishlist I have found that stuff in /tmp is prone to being cleaned by various initscripts. You're right. But I think it shouldn't be an option. We should use a different directory than /tmp, always. That would be good, maybe just use /mnt/ as the base dir? Not very pretty, works for this purpose. By the way I can change mktemp to use the environment variable TMPDIR. So you can change set a different directory with “export TMPDIR=/foo” if you like. That would be ok, dunno if I'd use that from the initramfs, it would require interaction. Thanks, Kel.
Bug#468962: bootchart: allow temp logging dir to be configurable
Hi Kel, Kel Modderman schrieb am Mon 03. Mar, 08:40 (+1000): On Monday 03 March 2008 04:16:19 Jörg Sommer wrote: Kel Modderman schrieb am Mon 03. Mar, 02:14 (+1000): Package: bootchart Version: 0.10~svn407-1 Severity: wishlist I have found that stuff in /tmp is prone to being cleaned by various initscripts. You're right. But I think it shouldn't be an option. We should use a different directory than /tmp, always. That would be good, maybe just use /mnt/ as the base dir? Not very pretty, works for this purpose. By the way I can change mktemp to use the environment variable TMPDIR. So you can change set a different directory with “export TMPDIR=/foo” if you like. That would be ok, dunno if I'd use that from the initramfs, it would require interaction. Why? If you write BOOTLOG_DIR or TMPDIR into bootchartd.conf, where's the difference? Can you test these packages? http://alioth.debian.org/~jo-guest/debian/bootchart_0.10~svn407-3_all.deb http://alioth.debian.org/~jo-guest/debian/bootchart-view_0.10~svn407-3_all.deb Bye, Jörg. -- “Science is the game we play with God to find out what his rules are.” signature.asc Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP