Petter Reinholdtsen wrote:
Anyone got a complete patch replacing the code in /etc/init.d/rc using
'type usplash_write' to decide what to do? I suspect at least some
splash_progress is needed. :)
Attached.
(you need to manually add a splash_progress NOP function to
/lib/init/splash-functions-base)
--
David Härdeman
diff -ur ./sysvinit-2.86.ds1.orig/debian/sysv-rc/etc/init.d/rc ./sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc
--- ./sysvinit-2.86.ds1.orig/debian/sysv-rc/etc/init.d/rc 2007-05-09 21:03:34.000000000 +0200
+++ ./sysvinit-2.86.ds1/debian/sysv-rc/etc/init.d/rc 2007-05-09 21:14:50.000000000 +0200
@@ -39,13 +39,8 @@
# 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
+# Functions for splash progress bars
+. /lib/init/splash-functions-base
# Now find out what the current and what the previous runlevel are.
@@ -72,15 +67,13 @@
fi
#
-# Stub to do progress bar ticks (currently just for usplash) on startup
+# Stub to do progress bar ticks (for splash programs) on startup
#
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
+ step=$(($step + $step_change))
+ progress=$(($step * $progress_size / $num_steps + $first_step))
+ $debug splash_progress "$progress" || true
}
#
@@ -225,20 +218,18 @@
;;
esac
- if [ "$SPLASH" = true ] ; then
- # Count the number of scripts we need to run (for usplash
- # progress bar)
- num_steps=0
- for s in /etc/rc$runlevel.d/[SK]*; do
- case "${s##/etc/rc$runlevel.d/S??}" in
- gdm|xdm|kdm|ltsp-client|reboot|halt)
- break
- ;;
- esac
- num_steps=$(($num_steps + 1))
- done
- step=0
- fi
+ # Count the number of scripts we need to run
+ # (for progress bars)
+ num_steps=0
+ for s in /etc/rc$runlevel.d/[SK]*; do
+ case "${s##/etc/rc$runlevel.d/S??}" in
+ gdm|xdm|kdm|ltsp-client|reboot|halt)
+ break
+ ;;
+ esac
+ num_steps=$(($num_steps + 1))
+ done
+ step=0
# First, run the KILL scripts.
if [ "$previous" != N ]