From: Jesper FA (424242424242424242_at_j-f.dk)
Date: Fri 15 Nov 2002 - 01:28:42 GMT
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
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