[Pkg-sysvinit-commits] r801 - in sysvinit/trunk/debian: . initscripts/etc/init.d sysv-rc/etc/init.d

Petter Reinholdtsen pere at costa.debian.org
Fri Jul 14 14:04:15 UTC 2006


Author: pere
Date: 2006-07-14 14:04:14 +0000 (Fri, 14 Jul 2006)
New Revision: 801

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
   sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
Log:
Changed patch to check once in init.d/rc if the progress bar is
enabled, and to use the same way in sendsigs and rc to decide if
it is enabled or not.


Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-07-14 13:06:26 UTC (rev 800)
+++ sysvinit/trunk/debian/changelog	2006-07-14 14:04:14 UTC (rev 801)
@@ -23,7 +23,9 @@
   * Change runlevel manpage to be less misleading.  Patch from Ubuntu.
   * Change messages from init.d/sendsigs.  Based on patch from Ubuntu.
   * Update progress bar changes in init.d/sendsigs and init.d/rc.
-    Patch from Ubuntu.
+    Patch from Ubuntu.  Changed patch to check once in init.d/rc if
+    the progress bar is enabled, and to use the same way in sendsigs
+    and rc to decide if it is enabled or not.
   * Acknowledge NMU.  Thanks, Steinar H. Gunderson . (Closes: #359176)
 
   [ Thomas Hood ]

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs	2006-07-14 13:06:26 UTC (rev 800)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/sendsigs	2006-07-14 14:04:14 UTC (rev 801)
@@ -26,14 +26,14 @@
 
 splash_back() {
     # Restore usplash if it was enabled and killed by do_stop
-    for x in $(cat /proc/cmdline); do
-	case $x in
-	splash*)
-            SPLASH=true;
-            ;;
-	esac
-    done
 
+    # Decide if usplash progress bar should be activated or not.
+    if type usplash_write >/dev/null 2>&1; then
+	SPLASH=true
+    else
+	SPLASH=false
+    fi
+
     [ "$SPLASH" = "true" ] || return 0
 
     if [ -x /sbin/usplash ]; then

Modified: sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
===================================================================
--- sysvinit/trunk/debian/sysv-rc/etc/init.d/rc	2006-07-14 13:06:26 UTC (rev 800)
+++ sysvinit/trunk/debian/sysv-rc/etc/init.d/rc	2006-07-14 14:04:14 UTC (rev 801)
@@ -39,6 +39,14 @@
 # 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 in 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.
 
 runlevel=$RUNLEVEL
@@ -74,9 +82,9 @@
 #
 startup_progress() {
     $@
-    step=$(($step + $step_change))
-    progress=$(($step * $progress_size / $num_steps + $first_step))
-    if type usplash_write >/dev/null 2>&1; then
+    if [ "$SPLASH" = true ] ; then
+        step=$(($step + $step_change))
+        progress=$(($step * $progress_size / $num_steps + $first_step))
         usplash_write "PROGRESS $progress" || true
     fi
 }
@@ -218,19 +226,21 @@
 			;;
 	esac
 
-	# 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|reboot|halt)
+        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|reboot|halt)
                     break
                     ;;
-            esac
-            num_steps=$(($num_steps + 1))
-        done
+                esac
+                num_steps=$(($num_steps + 1))
+            done
+            step=0
+        fi
 
-        step=0
-
 	# First, run the KILL scripts.
 	if [ "$previous" != N ]
 	then




More information about the Pkg-sysvinit-commits mailing list