[Pkg-sysvinit-devel] Bug#544565: Wrong checks with CONCURRENCY=startpar or =shell
Cortese, Matteo
matteo.cortese at delphi.com
Tue Sep 1 15:48:34 UTC 2009
Package: sysv-rc
Version: 2.87dsf-2
Tags: patch
See this snippet from /etc/init.d/rc:
# Check if we are able to use make like booting. It require the
# insserv package to be enabled.
#
if [ startpar = "$CONCURRENCY" ] || [ makefile = "$CONCURRENCY" ] ; then
test -s /etc/init.d/.depend.boot || CONCURRENCY="none"
test -s /etc/init.d/.depend.start || CONCURRENCY="none"
test -s /etc/init.d/.depend.stop || CONCURRENCY="none"
startpar -v > /dev/null 2>&1 || CONCURRENCY="none"
fi
As far as I understand, the .depend.* files are needed by startpar only
when it is invoved with "-M". In other words, this check should be
performed only when CONCURRENCY is set to "makefile", not when it is set
to "startpar".
Besides, the fourth test is for the presence of startpar itself. Note
however that when CONCURRENCY is set to "shell" (which is deprecated,
but still supported) this test is skipped, but the code that follows
does indeed expect startpar to be present.
The following patch should address both issues.
--- a/debian/sysv-rc/etc/init.d/rc
+++ b/debian/sysv-rc/etc/init.d/rc
@@ -101,7 +101,7 @@
# Check if we are able to use make like booting. It require the
# insserv package to be enabled.
#
-if [ startpar = "$CONCURRENCY" ] || [ makefile = "$CONCURRENCY" ] ;
then
+if [ makefile = "$CONCURRENCY" ] ; then
test -s /etc/init.d/.depend.boot || CONCURRENCY="none"
test -s /etc/init.d/.depend.start || CONCURRENCY="none"
test -s /etc/init.d/.depend.stop || CONCURRENCY="none"
@@ -109,6 +109,13 @@
fi
#
+# Check if we are able to use parallel booting with startpar.
+#
+if [ startpar = "$CONCURRENCY" ] || [ shell = "$CONCURRENCY" ] ; then
+ startpar -v > /dev/null 2>&1 || CONCURRENCY="none"
+fi
+
+#
# Start script or program.
#
case "$CONCURRENCY" in
****************************************************************************************
Note: If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you.
****************************************************************************************
More information about the Pkg-sysvinit-devel
mailing list