The package sysv-rc has been upgraded to version 2.86.ds1-20 in the unstable branch and the actual patch doesn't work correctly. Here is the patch for the new version of sysv-rc, including the modifications by Varun Hiremath.
Greetings, -- Pablo Chinea [EMAIL PROTECTED] http://www.khertz.net/
*** rc.sysv-rc 2006-09-08 17:38:56.000000000 +0100 --- rc.bootsplash 2006-09-22 10:21:18.000000000 +0100 *************** *** 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:/bin:/usr/sbin:/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)) ! 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,289 **** SCRIPTS="$SCRIPTS $i" done startup stop $SCRIPTS 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/') --- 297,309 ---- 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 # Now run the START scripts for this runlevel. # Run all scripts with the same level in parallel CURLEVEL="" for s in /etc/rc$runlevel.d/S* do level=$(echo $s | sed 's/.*\/S\([0-9][0-9]\).*/\1/') *************** *** 316,321 **** --- 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 *************** *** 327,332 **** --- 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
pgpiP3jRdkuIb.pgp
Description: PGP signature