Get bootchart to mount $LOG_DIR to /lib/bootchart so our profiling functions know where to create init_pidname.log --- script.orig/bootchartd 2005-11-13 17:40:01.000000000 +0000 +++ script/bootchartd 2006-08-04 13:25:00.000000000 +0100 @@ -27,16 +27,15 @@ elif [ -f $CONF ]; then . $CONF else - echo "$CONF missing" + echo "$CONF missing" >&2 exit 1 fi - # Start the boot logger. start() { # Make sure only a single instance is running - [ -f "$BOOTLOG_LOCK" ] && return + [ -f "/lib/bootchart/$BOOTLOG_LOCK" ] && return # Mount the temporary file system for log file storage. If possible, # a temporary directory is created. In most cases though (i.e. during @@ -49,8 +48,13 @@ LAZY_UMOUNT="yes" mount -n -t tmpfs -o size=$TMPFS_SIZE none "$LOG_DIR" >/dev/null 2>&1 fi + cd "$LOG_DIR" > "$BOOTLOG_LOCK" + + # OK, now bind to a fixed directory so we can create init_pidname.log + mount --bind "$LOG_DIR" /lib/bootchart + [ -n "$LAZY_UMOUNT" ] && umount -nfl "$LOG_DIR" # Enable process accounting if configured @@ -168,6 +172,9 @@ rmdir "$LOG_DIR" fi + # We're done, so we can release the mount + umount /lib/bootchart + # Render the chart if configured (and the renderer is installed) [ "$AUTO_RENDER" = "yes" -a -x /usr/bin/bootchart ] && \ /usr/bin/bootchart -o "$AUTO_RENDER_DIR" -f $AUTO_RENDER_FORMAT "$BOOTLOG_DEST"