[Pkg-sysvinit-commits] r1298 - in sysvinit/trunk/debian: . sysv-rc/sbin
pere at alioth.debian.org
pere at alioth.debian.org
Tue Aug 12 10:53:17 UTC 2008
Author: pere
Date: 2008-08-12 10:53:17 +0000 (Tue, 12 Aug 2008)
New Revision: 1298
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/sysv-rc/sbin/invoke-rc.d
Log:
* Modify runlevel detection code in invoke-rc.d to notice the
difference between runlevels 0 and 6, and the boot runlevel, to
make it possible to use invoke-rc.d during boot (Closes: 384509).
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2008-08-12 10:51:26 UTC (rev 1297)
+++ sysvinit/trunk/debian/changelog 2008-08-12 10:53:17 UTC (rev 1298)
@@ -4,6 +4,9 @@
Julien Danjou for noticing.
* Fix typo in rcS(5), maually->manually (Closes: #493680). Thanks to
Xr for noticing.
+ * Modify runlevel detection code in invoke-rc.d to notice the
+ difference between runlevels 0 and 6, and the boot runlevel, to
+ make it possible to use invoke-rc.d during boot (Closes: 384509).
-- Petter Reinholdtsen <pere at debian.org> Tue, 12 Aug 2008 12:45:37 +0200
Modified: sysvinit/trunk/debian/sysv-rc/sbin/invoke-rc.d
===================================================================
--- sysvinit/trunk/debian/sysv-rc/sbin/invoke-rc.d 2008-08-12 10:51:26 UTC (rev 1297)
+++ sysvinit/trunk/debian/sysv-rc/sbin/invoke-rc.d 2008-08-12 10:53:17 UTC (rev 1298)
@@ -280,6 +280,15 @@
RL=
fi
+## Running ${RUNLEVEL} to get current runlevel do not work in the boot
+## runlevel (scrints in /etc/rcS.d/), as /var/run/utmp contain
+## runlevel 0 or 6 at that point.
+if test x${RL} = x0 || test x${RL} = x6 ; then
+ if ps -fp 1 | grep -q 'init boot' ; then
+ RL=S
+ fi
+fi
+
## Handles shutdown sequences VERY safely
## i.e.: forget about policy, and do all we can to run the script.
## BTW, why the heck are we being run in a shutdown runlevel?!
More information about the Pkg-sysvinit-commits
mailing list