El Jueves, 31 de Agosto de 2006 03:11, David Broome escribió:
> The progress bar during boot does not start until after the kernel part is
> done (which makes sense since it is an init script)  Once it comes on it
> works very well.

  Obviously, it cannot be solved from the init script. But I have been using 
bootsplash since long time ago (from backported packages) and always it has 
worked in that way.

> During shutdown it hits the halfway mark then starts over.

  Yes, I also realized it, but it is an usplash code issue, it happens to me 
also with usplash. It calculates the progress with the K scripts, and start 
again with S scripts. This is the price of reuse code, usplash bugs are 
bootsplash bugs :-P.

  There are another problem with bootsplash, the fbmngplay doesn't work (the 
program that show the animations), I already sent the report about this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=385443

  I fixed a problem with the rc patch, bootsplash expects to receive the name 
of the script that is running in every moment and I was sending to it the 
full path. I had not realized this bug because it is needed for the 
animations, and the animations doesn't works. I've attached the new version 
of the patch.

-- 

Pablo Chinea
[EMAIL PROTECTED]
http://www.khertz.net/
*** rc.sysv-rc	2006-07-25 18:51:00.000000000 +0100
--- rc.bootsplash	2006-08-31 11:05:40.000000000 +0100
***************
*** 12,17 ****
--- 12,19 ----
  # Authors:
  # 	Miquel van Smoorenburg <[EMAIL PROTECTED]>
  # 	Bruce Perens <[EMAIL PROTECTED]>
+ # 	Edited for bootsplash by Pablo Chinea <[EMAIL PROTECTED]>, 2006
+ #
  
  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.
  
--- 41,56 ----
  # 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.
  
***************
*** 72,77 ****
--- 77,83 ----
  	then
  		/sbin/unconfigured.sh
  	fi
+ 	rc_splash "splash start"  # let bootsplash know we are ready
  fi
  
  . /etc/default/rcS
***************
*** 82,92 ****
  #
  startup_progress() {
      $@
!     if [ "$SPLASH" = true ] ; then
!         step=$(($step + $step_change))
!         progress=$(($step * $progress_size / $num_steps + $first_step))
!         usplash_write "PROGRESS $progress" || true
!     fi
  }
  
  #
--- 88,98 ----
  #
  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
  }
  
  #
***************
*** 192,197 ****
--- 198,212 ----
  	;;
  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
***************
*** 229,235 ****
  			;;
  	esac
  
-         if [ "$SPLASH" = true ] ; then
  	    # Count the number of scripts we need to run (for usplash
  	    # progress bar)
  	    num_steps=0
--- 244,249 ----
***************
*** 242,248 ****
                  num_steps=$(($num_steps + 1))
              done
              step=0
-         fi
  
  	# First, run the KILL scripts.
  	if [ "$previous" != N ]
--- 256,261 ----
***************
*** 281,286 ****
--- 294,300 ----
  				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
  
***************
*** 320,325 ****
--- 334,340 ----
  			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
  
***************
*** 340,345 ****
--- 355,362 ----
  	fi
  fi
  
+ rc_splash "master"  # stop playing animations
+ 
  trap - EXIT # Disable emergency handler
  
  exit 0

Attachment: pgpQOu3jaGKkG.pgp
Description: PGP signature

Reply via email to