Hello, I sent the new patch to the official maintainer of the 
package last month, but it seems he could not have released it yet.

  I've attached the new version of the patch here.

  Greetings,

-- 

Pablo Chinea
[EMAIL PROTECTED]
http://www.khertz.net/
*** rc.sysv-rc	2006-11-27 22:25:11.000000000 +0000
--- rc.bootsplash	2006-11-30 16:34:34.000000000 +0000
***************
*** 12,17 ****
--- 12,21 ----
  # Authors:
  # 	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:/usr/sbin:/bin:/usr/bin
  export PATH
***************
*** 39,51 ****
  # Set onlcr to avoid staircase effect.
  stty onlcr 0>&1
  
! # Decide if usplash progress bar should be activated or not.  Override
! # in /etc/default/rcS if required.
! if type usplash_write >/dev/null 2>&1; then
!     SPLASH=true
! else
!     SPLASH=false
! fi
  
  # Now find out what the current and what the previous runlevel are.
  
--- 43,58 ----
  # Set onlcr to avoid staircase effect.
  stty onlcr 0>&1
  
! # source the bootsplash config file
! test -f /etc/default/bootsplash && . /etc/default/bootsplash
! 
! #
! # Update bootsplash stuff. (progress bar, animations...)
! #
! rc_splash() {
! 	export progress
! 	test "$SPLASH" != "no" && /sbin/splash.sh "$1"
! }
  
  # Now find out what the current and what the previous runlevel are.
  
***************
*** 62,67 ****
--- 69,76 ----
  
  export runlevel previous
  
+ [ S = "$runlevel" ] && rc_splash "splash start"  # let bootsplash know we are ready
+ 
  . /etc/default/rcS
  export VERBOSE
  
***************
*** 76,86 ****
  #
  startup_progress() {
      $@
!     if [ "$SPLASH" = true ] ; then
!         step=$(($step + $step_change))
!         progress=$(($step * $progress_size / $num_steps + $first_step))
!         $debug usplash_write "PROGRESS $progress" || true
!     fi
  }
  
  #
--- 85,95 ----
  #
  startup_progress() {
      $@
! 		step=$(($step + $step_change))
! 		progress=$(($step * $progress_size / $num_steps + $first_step))
! 		if type usplash_write >/dev/null 2>&1; then
! 			usplash_write "PROGRESS $progress" || true
! 		fi
  }
  
  #
***************
*** 188,193 ****
--- 197,211 ----
  	;;
  esac
  
+ #
+ # let bootsplash know if we are shutting down
+ #
+ if [ "$runlevel" = "0" -o "$runlevel" = "6" ]
+ then
+    rc_splash "splash start"
+    rc_splash "shutdown"
+ fi
+ 
  # Is there an rc directory for this new runlevel?
  if [ -d /etc/rc$runlevel.d ]
  then
***************
*** 225,231 ****
  			;;
  	esac
  
-         if [ "$SPLASH" = true ] ; then
  	    # Count the number of scripts we need to run (for usplash
  	    # progress bar)
  	    num_steps=0
--- 243,248 ----
***************
*** 237,244 ****
                  esac
                  num_steps=$(($num_steps + 1))
              done
              step=0
-         fi
  
  	# First, run the KILL scripts.
  	if [ "$previous" != N ]
--- 254,264 ----
                  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.
  	if [ "$previous" != N ]
***************
*** 277,282 ****
--- 297,303 ----
  				SCRIPTS="$SCRIPTS $i"
  			done
  			startup stop $SCRIPTS
+ 			rc_splash "${i#/etc/rc$runlevel.d/K[0-9][0-9]} stop"  # update bootsplash progress bar
  		done
  	fi
  
***************
*** 315,320 ****
--- 336,342 ----
  			SCRIPTS="$SCRIPTS $i"
  		done
  		startup $ACTION $SCRIPTS
+ 		rc_splash "${i#/etc/rc$runlevel.d/S[0-9][0-9]} $ACTION"  # update bootsplash progress bar
  	done
  fi
  
***************
*** 326,331 ****
--- 348,355 ----
  	[ -d /etc/rc.boot ] && run-parts /etc/rc.boot
  fi
  
+ rc_splash "master"  # stop playing animations
+ 
  trap - EXIT # Disable emergency handler
  
  exit 0

Attachment: pgpIWyHGEuKQP.pgp
Description: PGP signature

Reply via email to