[Pkg-sysvinit-devel] Bug#497665: sysv-rc: Detect failed runlevel properly.

Mats Erik Andersson mats.andersson at gisladisker.se
Tue Apr 3 22:57:04 UTC 2012


Explicit patch for this problem. Ripe for action?

--- /usr/sbin/invoke-rc.d.orig
+++ /usr/sbin/invoke-rc.d
@@ -273,13 +273,15 @@
 fi
 
 ## Queries sysvinit for the current runlevel
-RL=`${RUNLEVEL} | sed 's/.*\ //'`
+RL=`${RUNLEVEL}`
 if test ! $? ; then
     printerror "could not determine current runlevel"
     if test x${RETRY} = x ; then
 	exit 102
     fi
     RL=
+else
+    RL=`echo $RL | sed 's/.*\ //'`
 fi
 
 ## Running ${RUNLEVEL} to get current runlevel do not work in the boot





More information about the Pkg-sysvinit-devel mailing list