[Pkg-sysvinit-devel] Bug#505468: initscripts: /lib/init/vars.sh overrides VERBOSE
Petter Reinholdtsen
pere at hungry.com
Sun Oct 25 17:21:40 UTC 2009
forcemerge 505468 543813 535551
severity 505468 normal
thanks
Here is a patch proposal to change this, to both get quiet boots and
non-quiet upgrades/interactive use. vars.sh should then only set the
VERBOSE variable from /proc/cmdline during boot and shutdown, and not
when scripts are called interactively.
Index: debian/src/initscripts/lib/init/vars.sh
===================================================================
--- debian/src/initscripts/lib/init/vars.sh (revision 1796)
+++ debian/src/initscripts/lib/init/vars.sh (working copy)
@@ -12,9 +12,13 @@
NOSWAP=no
fi
-# Accept the same 'quiet' option as the kernel
-if [ ! -e /proc/cmdline ] || egrep -qw 'quiet' /proc/cmdline ; then
- VERBOSE="no"
+# Accept the same 'quiet' option as the kernel, but only during boot
+# and shutdown. Only use this rule when the variables set by
+# init.d/rc is present.
+if [ "$RUNLEVEL" ] && [ "$PREVLEVEL" ] ; then
+ if [ ! -e /proc/cmdline ] || egrep -qw 'quiet' /proc/cmdline ; then
+ VERBOSE="no"
+ fi
fi
# But allow both rcS and the kernel options 'quiet' to be overrided
Would this change have any unexpected side-effects?
Happy hacking,
--
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list