From: Matt Ayres (matta_at_kindhosts.com)
Date: Fri 01 Nov 2002 - 22:15:15 GMT
A much easier way to do this is to simply use the fakeinit flag. You also
need to remove everything from the boot runlevel.
On Fri, 1 Nov 2002, John P. Eisenmenger wrote:
> On Thursday 31 October 2002 06:49 am, you wrote:
> > Thank you Georges !
> >
> > I now have my own Gentoo vserver too.. (and a rh80, and a rh73 :-)
> >
> > I only have one annoying problem I haven't figured out.
> >
> > I've cleaned out the runlevels boot and default for all crap not suppose
> > to be run including serial and other stuff.. actually there's almost
> > nothing left.
> >
> > I have only problem though. I can enter vserver just fine, but if I run
> > vserver gentoo-vserver start
> >
> > it fails with a message about /etc/rc.d/rc not found..
>
> I ended up hacking the vserver script to make it work with Gentoo. My patches
> follow below. Essentially since /etc/init.d/rc does not exist in Gentoo, the
> vserver script defaults to /etc/rc.d/rc which also does not exist in Gentoo.
> This hack determines the proper STARTCMD by examining the Gentoo vserver's
> /etc/inittab file for the line containing field 2 matching $INITDEFAULT
> (usually 3) and "/sbin/rc" in the command. This seems to work for me...
>
> FWIW I have Mandrake 9.0 as my host OS and vservers for Debian, Gentoo, and
> both Mandrake 8.2 and 9.0.
>
> -John
>
> *** vserver 2002-09-27 09:28:10.000000000 -0500
> --- /usr/sbin/vserver 2002-10-25 10:25:08.000000000 -0500
> ***************
> *** 357,362 ****
> --- 357,364 ----
> STARTCMD="/etc/rc.d/rc $INITDEFAULT"
> if [ -x /vservers/$1/etc/init.d/rc ] ; then
> STARTCMD="/etc/init.d/rc $INITDEFAULT"
> + elif [ -x /vservers/$1/usr/bin/emerge ] ; then
> + STARTCMD=` awk -F: '$2 == "'$INITDEFAULT'" && $NF ~ /\/sbin\/rc/ {print
> $NF}' /vservers/$1/etc/inittab `
> fi
>
> DISCONNECT=
> ***************
> *** 465,470 ****
> --- 467,474 ----
> STOPCMD="/etc/rc.d/rc 6"
> if [ -x /vservers/$1/etc/init.d/rc ] ; then
> STOPCMD="/etc/init.d/rc 6"
> + elif [ -x /vservers/$1/usr/bin/emerge ] ; then
> + STOPCMD=` awk -F: '$2 == "6" && $NF ~ /\/sbin\/rc/ {print $NF}'
> /vservers/$1/etc/inittab `
> fi
> for f in $S_FLAGS dummy
> do
>