[Pkg-sysvinit-commits] r1300 - in sysvinit/trunk/debian: . sysv-rc/etc/init.d
pere at alioth.debian.org
pere at alioth.debian.org
Tue Aug 12 12:33:44 UTC 2008
Author: pere
Date: 2008-08-12 12:33:43 +0000 (Tue, 12 Aug 2008)
New Revision: 1300
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
Log:
* Move responsibility of stopping the splash screen process from
individual init.d scripts to init.d/rc. This make sure the
progress calculation reflect reality, and that the splash screen
is taken down in runlevel 1 and that it stop before gdm and kdm.
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2008-08-12 11:03:44 UTC (rev 1299)
+++ sysvinit/trunk/debian/changelog 2008-08-12 12:33:43 UTC (rev 1300)
@@ -10,6 +10,10 @@
* Make sure to call restorecon after mounting tmpfs file systems, to
set SELinux permissions (Closes: #493679). Patch from Russell
Coker.
+ * Move responsibility of stopping the splash screen process from
+ individual init.d scripts to init.d/rc. This make sure the
+ progress calculation reflect reality, and that the splash screen
+ is taken down in runlevel 1 and that it stop before gdm and kdm.
-- Petter Reinholdtsen <pere at debian.org> Tue, 12 Aug 2008 12:45:37 +0200
Modified: sysvinit/trunk/debian/sysv-rc/etc/init.d/rc
===================================================================
--- sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2008-08-12 11:03:44 UTC (rev 1299)
+++ sysvinit/trunk/debian/sysv-rc/etc/init.d/rc 2008-08-12 12:33:43 UTC (rev 1300)
@@ -53,6 +53,7 @@
else
# Quiet down script if old initscripts version without /lib/init/splash-functions-base is used.
splash_progress() { return 1; }
+ splash_stop() { return 1; }
fi
# Now find out what the current and what the previous runlevel are.
@@ -226,6 +227,19 @@
;;
esac
+# Check if the splash screen should be stopped before the given
+# script.
+is_splash_stop_scripts() {
+ scriptname=$1
+ case "$scriptname" in
+ # killprocs is used in runlevel 1
+ gdm|xdm|kdm|ltsp-client|ltsp-client-core|reboot|halt|killprocs)
+ return 0
+ ;;
+ esac
+ return 1
+}
+
# Is there an rc directory for this new runlevel?
if [ -d /etc/rc$runlevel.d ]
then
@@ -267,11 +281,9 @@
# (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|ltsp-client-core|reboot|halt)
+ if is_splash_stop_scripts "${s##/etc/rc$runlevel.d/S??}" ; then
break
- ;;
- esac
+ fi
num_steps=$(($num_steps + 1))
done
step=0
@@ -313,6 +325,9 @@
# Stop the service.
SCRIPTS="$SCRIPTS $i"
+ if is_splash_stop_scripts "$suffix" ; then
+ splash_stop || true
+ fi
done
startup stop $SCRIPTS
done
@@ -336,13 +351,13 @@
do
[ ! -f $i ] && continue
+ suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
if [ "$previous" != N ]
then
#
# Find start script in previous runlevel and
# stop script in this runlevel.
#
- suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
stop=/etc/rc$runlevel.d/K[0-9][0-9]$suffix
previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
#
@@ -366,6 +381,9 @@
fi
SCRIPTS="$SCRIPTS $i"
+ if is_splash_stop_scripts "$suffix" ; then
+ splash_stop || true
+ fi
done
startup $ACTION $SCRIPTS
done
More information about the Pkg-sysvinit-commits
mailing list