Package: sysv-rc-bootsplash
Version: 1.0.5-3
Severity: normal
Tags: patch

After install the last version of bootsplash (with the fbmngplay fixed)
I realize the sysv-rc script patch doesn't work correctly. I fixed it, 
and with this modification I get a general improve. Here is the new patch.

  Changelog:
    * Animations doesn't start/stop correctly. Fixed.
    * Progress couldn't be calculated correctly in concurrency modes (shell 
and startpar), progress bar disabled in both modes.
    * Progress bar improved, now the movement is softer.

  Greetings,

       Pablo


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
*** rc.sysv-rc  2006-11-27 22:23:38.000000000 +0000
--- rc.bootsplash       2007-02-01 22:36:52.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
  }
  
  #
***************
*** 183,193 ****
--- 192,212 ----
                                startup_progress $debug "$script" $action
                                ;;
                        esac
+                       rc_splash "${script#/etc/rc[S0-6].d/[SK][0-9][0-9]} 
$action"  # update bootsplash progress bar
                done
        }
        ;;
  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
--- 244,249 ----
***************
*** 237,244 ****
                  esac
                  num_steps=$(($num_steps + 1))
              done
              step=0
-         fi
  
        # First, run the KILL scripts.
        if [ "$previous" != N ]
--- 255,265 ----
                  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 ]
***************
*** 326,331 ****
--- 347,354 ----
        [ -d /etc/rc.boot ] && run-parts /etc/rc.boot
  fi
  
+ rc_splash "master"  # stop playing animations
+ 
  trap - EXIT # Disable emergency handler
  
  exit 0

Reply via email to