Date: Mon, 08 Jan 2007 14:04:17 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: olli@lurza.secnetix.de Cc: erik.udo@gmail.com, freebsd-hackers@FreeBSD.org, dougb@FreeBSD.org, jhb@FreeBSD.org Subject: Re: Init.c, making it chroot Message-ID: <20070108.140417.1176919806.imp@bsdimp.com> In-Reply-To: <200701081948.l08JmeS5069496@lurza.secnetix.de> References: <200701081420.07376.jhb@freebsd.org> <200701081948.l08JmeS5069496@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200701081948.l08JmeS5069496@lurza.secnetix.de> Oliver Fromme <olli@lurza.secnetix.de> writes: : : John Baldwin wrote: : > On Saturday 06 January 2007 14:27, Oliver Fromme wrote: : > > M. Warner Losh wrote: : > > > Also, kenv(KENV_GET, ... is used a lot. Maybe it makes sense to have : > > > a simple kenvget call. Would make a few lines a little shorter if : > > > nothing else. : > > : > > KENV_GET is used three times. Using a wrapper function : > > would save 7 characters per call. I don't think it's : > > really worth it. But if you insist, I can update the : > > patch with such a function. : > : > I think just using kenv() is fine. : : OK, so how do we proceed now? : Should I submit a PR containing the patch? Send me the final patch as an attachment to an email, and I'll make sure it gets committed. Warner : I'm also willing to write a bit of documentation for the : new init_* kenv variables, but I'm not sure where to put : it. The existing init_path variable is documented in : loader(8), so maybe it should go there? Also there should : be sample entries in /boot/defaults/loader.conf, of course, : like this: Both ideas are good. : --- loader.conf.orig Mon Jan 8 20:45:23 2007 : +++ loader.conf Mon Jan 8 20:47:48 2007 : @@ -77,6 +77,9 @@ : #boot_verbose="" # -v: Causes extra debugging information to be printed : #init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall" : # Sets the list of init candidates : +#init_shell="/bin/sh" # The shell binary used by init(8). : +#init_shript="" # Initial script to run by init(8) before chrooting. : +#init_chroot="" # Directory for init(8) to chroot into. : : : ############################################################## : : By the way, I just verified in the CVS repository that the : init.c code is identical in HEAD (1.62) and in RELENG_6 : (1.60.2.2). Therefore the patch should apply cleanly to : both HEAD and RELENG_6. Excellent! I look forward to it. BTW, if you have other patches/PRs, please contact me privately and I'll review/commit them. Warner : Best regards : Oliver : : -- : Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing : Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd : Any opinions expressed in this message may be personal to the author : and may not necessarily reflect the opinions of secnetix in any way. : : 'Instead of asking why a piece of software is using "1970s technology," : start asking why software is ignoring 30 years of accumulated wisdom.' : :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070108.140417.1176919806.imp>