--- rc.sysvinit-old 2004-06-23 08:37:12.000000000 +0200 +++ rc.sysvinit-new 2004-06-23 08:35:59.000000000 +0200 @@ -1,7 +1,5 @@ #!/bin/sh # -#!/bin/sh -# # rc.sysvinit This file provides basic compatibility with SystemV style # startup scripts. The SystemV style init system places # start/stop scripts for each runlevel into directories such as @@ -42,14 +40,15 @@ export prevlevel fi -# Run kill scripts in the previous runlevel if not "none" -if [ ! "$prevlevel" = "N" ]; then - for script in /etc/rc.d/rc$prevlevel.d/K* ; do - if [ -x $script ]; then - startup $script stop - fi - done +# Run kill scripts +if [ ! "$runlevel" = "S" ]; then + runlevel=1 fi +for script in /etc/rc.d/rc$runlevel.d/K* ; do + if [ -x $script ]; then + startup $script stop + fi +done # Now do the startup scripts: for script in /etc/rc.d/rc$runlevel.d/S* ; do