Package: sysv-rc-bootsplash
Version: 1.0.2-1
Severity: normal
Tags: patch

Hello,
I edited the patch provided by Pablo Chinea, and corrected the
misbehaviour of the progress bar during the shutdown. There was a
small bug, the variable step was reset to zero before executing the
Start scripts, after all the execution of all the Kill scripts. So the
progress bar was restarting.

I am attaching the patch against the current version of rc.bootsplash
included in 1.0.2-1 version of sysv-rc-bootsplash. I have also
attached the modified rc file rc.bootsplash.new . You can test it by
replacing the rc file in /etc/init.d/ with this.

BTW, the bootsplash package still does not include the splash.sh
provided by Pablo Chinea. Hope you upload the new version soon !

Regards
Varun


--
Varun Hiremath
Undergraduate Student,
Aerospace Engg. Department,
Indian Institute of Technology Madras,
Chennai, India
--------------------------------------------------------------------
web page : http://www.ae.iitm.ac.in/~ae03b032
--- rc.bootsplash	2006-09-21 19:07:25.000000000 +0530
+++ rc.bootsplash.new	2006-09-21 19:16:29.000000000 +0530
@@ -13,7 +13,8 @@
 # 	Miquel van Smoorenburg <[EMAIL PROTECTED]>
 # 	Bruce Perens <[EMAIL PROTECTED]>
 # 	Edited for bootsplash by Pablo Chinea <[EMAIL PROTECTED]>, 2006
-#
+#       Edited by Varun Hiremath <[EMAIL PROTECTED]>, 2006 
+#corrected misbehaviour of the progress bar during the shutdown sequence
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export PATH
@@ -255,6 +256,10 @@
                 esac
                 num_steps=$(($num_steps + 1))
             done
+	    if [ "$runlevel" = "0" -o "$runlevel" = "6" ]
+	    then
+		num_steps=$(($num_steps - 1))   #To make sure the progress bar completes 100%
+	    fi
             step=0
 
 	# First, run the KILL scripts.
@@ -294,14 +299,13 @@
 				SCRIPTS="$SCRIPTS $i"
 			done
 			startup stop $SCRIPTS
-			rc_splash "$i stop"  # update bootsplash progress bar
+			rc_splash "${i#/etc/rc$runlevel.d/K[0-9][0-9]} stop"  # update bootsplash progress bar
 		done
 	fi
 
 	# Now run the START scripts for this runlevel.
 	# Run all scripts with the same level in parallel
 	CURLEVEL=""
-	step=0
 	for s in /etc/rc$runlevel.d/S*
 	do
 		level=$(echo $s | sed 's/.*\/S\([0-9][0-9]\).*/\1/')
@@ -334,7 +338,7 @@
 			SCRIPTS="$SCRIPTS $i"
 		done
 		startup $ACTION $SCRIPTS
-		rc_splash "$i $ACTION"  # update bootsplash progress bar
+		rc_splash "${i#/etc/rc$runlevel.d/S[0-9][0-9]} $ACTION"  # update bootsplash progress bar
 	done
 fi
 

Attachment: rc.bootsplash.new
Description: Binary data

Reply via email to