File bootchart-0.9.diff of Package bootchart

Index: script/bootchart
===================================================================
RCS file: /cvsroot/bootchart/bootchart/script/bootchart,v
retrieving revision 1.3
diff -u -3 -p -r1.3 bootchart
--- script/bootchart	13 Feb 2005 22:01:29 -0000	1.3
+++ script/bootchart	11 Oct 2005 07:46:56 -0000
@@ -13,8 +13,8 @@ fi
 
 # Configuration
 MAIN_CLASS="org.bootchart.Main"
-BASE_JARS="commons-cli.jar bootchart.jar"
-FLAGS="-Djava.awt.headless=true -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D"
+BASE_JARS="bootchart-commons-cli.jar bootchart.jar"
+FLAGS="-Xmx300m -Djava.awt.headless=true -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D"
 
 # Set parameters
 set_jvm
Index: script/bootchartd
===================================================================
RCS file: /cvsroot/bootchart/bootchart/script/bootchartd,v
retrieving revision 1.16
diff -u -3 -p -r1.16 bootchartd
--- script/bootchartd	26 Sep 2005 09:38:47 -0000	1.16
+++ script/bootchartd	11 Oct 2005 07:46:56 -0000
@@ -43,7 +43,7 @@ start()
 	# directory.
 	LOG_DIR="$( mktemp -d /tmp/bootchart.XXXXX 2>/dev/null )"
 	if [ -z "$LOG_DIR" ]; then
-		LOG_DIR="/mnt"
+		LOG_DIR="/lib/bootchart/mnt"
 		LAZY_UMOUNT="yes"
 		mount -n -t tmpfs -o size=$TMPFS_SIZE none "$LOG_DIR" >/dev/null 2>&1
 	fi
@@ -122,7 +122,7 @@ wait_boot()
 	local runlevel=$( sed -n 's/.*:\(.*\):initdefault:.*/\1/gp' /etc/inittab )
 
 	# The processes we have to wait for
-	local exit_proc="gdmgreeter gdm-binary kdm_greet kdm"
+	local exit_proc="gdmgreeter gdm-binary kdm_greet xterm konsole gnome-terminal"
 	# early_login in FC4 starts gdm early, so fall back to mingetty
 	local early_login="no"
 	grep -q early_login /proc/cmdline && early_login="yes"
@@ -132,12 +132,12 @@ wait_boot()
 	while [ -f "$BOOTLOG_LOCK" ]; do
 		if [ -n "$( pidof $exit_proc )" ]; then
 			# Give the exit process some time to start
-			sleep 5
+			sleep 2
 			# Flush the log files
 			stop
 			return
 		fi
-		sleep 2
+		usleep 300000
 	done;
 }
 
Index: script/bootchartd.conf
===================================================================
RCS file: /cvsroot/bootchart/bootchart/script/bootchartd.conf,v
retrieving revision 1.6
diff -u -3 -p -r1.6 bootchartd.conf
--- script/bootchartd.conf	26 Sep 2005 09:38:47 -0000	1.6
+++ script/bootchartd.conf	11 Oct 2005 07:46:56 -0000
@@ -16,7 +16,7 @@ SAMPLE_PERIOD=0.2
 # kernel needs to be configured to enable v3 accounting
 # (CONFIG_BSD_PROCESS_ACCT_V3). accton from the GNU accounting utilities
 # is also required.
-PROCESS_ACCOUNTING="no"
+PROCESS_ACCOUNTING="yes"
 
 # Tarball for the various boot log files
 BOOTLOG_DEST=/var/log/bootchart.tgz
@@ -24,7 +24,7 @@ BOOTLOG_DEST=/var/log/bootchart.tgz
 # Whether to automatically generate the boot chart once the boot logger
 # completes.  The boot chart will be generated in /var/log/bootchart.png.
 # Note that the bootchart package must be installed.
-AUTO_RENDER="no"
+AUTO_RENDER="yes"
 
 # Image format to use for the auto-generated boot chart
 # (choose between png, svg and eps).
--- script/bootchartd.orig	2007-06-19 19:35:21.850954000 +0200
+++ script/bootchartd	2007-06-19 19:37:32.782890000 +0200
@@ -121,7 +121,7 @@
 	local runlevel=$( sed -n 's/.*:\(.*\):initdefault:.*/\1/gp' /etc/inittab )
 
 	# The processes we have to wait for
-	local exit_proc="gdmgreeter gdm-binary kdm_greet xterm konsole gnome-terminal"
+	local exit_proc="gdmgreeter gdm-binary kdm_greet xterm konsole gnome-terminal mingetty stopinitrd"
 	# early_login in FC4 starts gdm early, so fall back to mingetty
 	local early_login="no"
 	grep -q early_login /proc/cmdline && early_login="yes"
@@ -131,7 +131,12 @@
 	while [ -f "$BOOTLOG_LOCK" ]; do
 		if [ -n "$( pidof $exit_proc )" ]; then
 			# Give the exit process some time to start
-			sleep 2
+			stopinitrd=$( pidof stopinitrd )
+			if [ -n "$stopinitrd" ] ; then
+				kill $stopinitrd
+			else
+				sleep 2
+			fi
 			# Flush the log files
 			stop
 			return
@@ -166,6 +171,18 @@
 	log_header
 
 	# Package log files
+        if test -f /dev/shm/bootchart.tgz; then
+           mkdir shm
+           cd shm
+           tar xf /dev/shm/bootchart.tgz
+           for i in *.log; do 
+              cat $i ../$i > $i.new && mv $i.new ../$i
+              rm $i
+           done
+           cd ..
+           rm /dev/shm/bootchart.tgz
+        fi
+
 	tar -zcf "$BOOTLOG_DEST" header $pacct *.log
 	if [ -z "$LAZY_UMOUNT" ]; then
 		rm "$LOG_DIR"/*
--- script/bootchartd.orig	2007-06-19 23:06:33.000000000 +0200
+++ script/bootchartd	2007-06-19 23:06:46.000000000 +0200
@@ -108,7 +108,7 @@
 		eval $cmd 2>/dev/null
 		echo
 		sleep $SAMPLE_PERIOD
-	done  >> "$logfile" || stop
+	done  >> "$LOG_DIR/$logfile" || stop
 }
 
 # Wait for the boot process to end.
@@ -121,7 +121,7 @@
 	# early_login in FC4 starts gdm early, so fall back to mingetty
 	local early_login="no"
 	grep -q early_login /proc/cmdline && early_login="yes"
-	if [ "$runlevel" -eq "2" -o "$runlevel" -eq "3" -o "$early_login" = "yes" ]; then
+	if [ "x$runlevel" = "x2" -o "x$runlevel" = "x3" -o "$early_login" = "yes" ]; then
 		exit_proc="mingetty agetty rungetty getty"
 	fi
 	while [ -f "$BOOTLOG_LOCK" ]; do
@@ -129,7 +129,11 @@
 			# Give the exit process some time to start
 			stopinitrd=$( pidof stopinitrd )
 			if [ -n "$stopinitrd" ] ; then
+				mv $LOG_DIR/* /root/dev/shm/
+				rm -f "$BOOTLOG_LOCK"
+				wait
 				kill $stopinitrd
+				exit 0
 			else
 				sleep 2
 			fi
@@ -167,17 +171,12 @@
 	log_header
 
 	# Package log files
-        if test -f /dev/shm/bootchart.tgz; then
-           mkdir shm
-           cd shm
-           tar xf /dev/shm/bootchart.tgz
-           for i in *.log; do 
-              cat $i ../$i > $i.new && mv $i.new ../$i
-              rm $i
-           done
-           cd ..
-           rm /dev/shm/bootchart.tgz
-        fi
+        for i in *.log; do
+		if test -f /dev/shm/$i; then
+			cat /dev/shm/$i $i > $i.new && mv $i.new $i
+              		rm /dev/shm/$i
+		fi
+	done
 
 	tar -zcf "$BOOTLOG_DEST" header $pacct *.log
 	if [ -z "$LAZY_UMOUNT" ]; then
openSUSE Build Service is sponsored by