Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Dec 2006 01:50:26 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Erik Udo <erik.udo@gmail.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: Init.c, making it chroot
Message-ID:  <20061227225026.GA76597@rambler-co.ru>
In-Reply-To: <4592C91C.2040801@gmail.com>
References:  <4592C91C.2040801@gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Dec 27, 2006 at 09:27:24PM +0200, Erik Udo wrote:
> How can i make init chroot after executing /etc/rc, and executing 
> /etc/rc again in the chrooted enviroment?
> 
Go look at the NetBSD init(8) that can do this, and bring us
back a patch for this.  Quote from the NetBSD init(8) manpage:

:  2.   Multi-user boot (default operation).  Executes /etc/rc (see rc(8)).
:       If this was the first state entered (as opposed to entering here
:       after state 1), then /etc/rc will be invoked with its first argument
:       being `autoboot'.  If /etc/rc exits with a non-zero (error) exit
:       code, commence single user operation by giving the super-user a
:       shell on the console by going to state 1 (single user).  Otherwise,
:       proceed to state 3.
: 
:       If value of the ``init.root'' sysctl node is not equal to / at this
:       point, the /etc/rc process will be run inside a chroot(2) indicated
:       by sysctl with the same error handling as above.


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFkviyqRfpzJluFF4RApTUAJ9pvHSUHurie8kVlO3xfr7QU7syGACfY25x
3a7+nJn3om3XmmsvioxmQPQ=
=j3r0
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061227225026.GA76597>