As it is the vserver script tries to guess how to start the default runlevet, that is where the rc script is and how to call it. Wouldn't something like this have a better chance?
STARTCMD=`grep ^l$INITDEFAULT /vservers/$1/etc/inittab |cut -d : -f4` As I read the man page to inittab there is no demand that the id should be e.g. l3 for runlevet 3 but on all the distributions I have looked at it is, including the one where the rc script is neither in /etc/rc.d nor /etc/init.d. Mayb it should be grep :$INITDEFAULT:wait: /vservers/$1/etc/inittab |cut -d : -f4 but I can't find anything that says that there can't be more than one wait per runlevel. On the other hand, if that is the case one should run them the same way as init. I have attached a patch that does it the first way both for start and stop. -- Jesper 1:46am up 3 days, 47 min, 1 user, load average: 2.79, 2.49, 2.08
--- vserver.org 2002-11-15 01:18:30.000000000 +0100 +++ vserver 2002-11-15 02:22:50.000000000 +0100 @@ -354,10 +354,7 @@ FLAGS= CAPS= get_initdefault $1 - STARTCMD="/etc/rc.d/rc $INITDEFAULT" - if [ -x /vservers/$1/etc/init.d/rc ] ; then - STARTCMD="/etc/init.d/rc $INITDEFAULT" - fi + STARTCMD=`grep ^l$INITDEFAULT /vservers/$1/etc/inittab |cut -d : -f4` DISCONNECT= for f in $S_FLAGS dummy @@ -462,10 +459,7 @@ # The fakeinit flag tell us how to turn off the server get_initdefault $1 export PREVLEVEL=$INITDEFAULT - STOPCMD="/etc/rc.d/rc 6" - if [ -x /vservers/$1/etc/init.d/rc ] ; then - STOPCMD="/etc/init.d/rc 6" - fi + STOPCMD=`grep ^l6 /vservers/$1/etc/inittab |cut -d : -f4` for f in $S_FLAGS dummy do case $f in
