[Pkg-sysvinit-devel] Bug#701031: initscripts: /lib/init/vars.sh stops processing the kernel command line after first recognized option

Raphaël Hertzog hertzog at debian.org
Wed Feb 20 17:47:22 UTC 2013


Package: initscripts
Version: 2.88dsf-41
Severity: normal
Tags: patch

/lib/init/vars.sh incorrectly uses "break" at the end of each "case"
statement (probably by mistake because break is required in C's switch
statement) which means that the loop on all parameters stops as soon
as either "quiet" or "noswap" is found. This obviously means that
setting both at the same time doesn't work currently...

Please apply this patch:

diff --git a/debian/src/initscripts/lib/init/vars.sh b/debian/src/initscripts/lib/init/vars.sh
index d30fc04..f0280fe 100644
--- a/debian/src/initscripts/lib/init/vars.sh
+++ b/debian/src/initscripts/lib/init/vars.sh
@@ -32,7 +32,6 @@ if [ -r /proc/cmdline ]; then
             # partitions/files when it is set.
             noswap)
 		NOSWAP=yes
-		break
 		;;
 
             # Accept the same 'quiet' option as the kernel, but only
@@ -42,7 +41,6 @@ if [ -r /proc/cmdline ]; then
 		if [ "$RUNLEVEL" ] && [ "$PREVLEVEL" ] ; then
 		    VERBOSE="no"
 		fi
-		break
 		;;
 	esac
     done

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils       8.20-3
ii  debianutils     4.3.4
ii  libc6           2.13-38
ii  lsb-base        4.1+Debian9
ii  mount           2.20.1-5.3
ii  sysv-rc         2.88dsf-41
ii  sysvinit-utils  2.88dsf-41

Versions of packages initscripts recommends:
ii  e2fsprogs  1.42.5-1
ii  psmisc     22.20-1

initscripts suggests no packages.

-- no debconf information



More information about the Pkg-sysvinit-devel mailing list