From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 8 21:07:15 2007 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3783B16A415; Mon, 8 Jan 2007 21:07:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B6D8413C455; Mon, 8 Jan 2007 21:07:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l08L44tb019718; Mon, 8 Jan 2007 14:04:05 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 08 Jan 2007 14:04:17 -0700 (MST) Message-Id: <20070108.140417.1176919806.imp@bsdimp.com> To: olli@lurza.secnetix.de From: "M. Warner Losh" In-Reply-To: <200701081948.l08JmeS5069496@lurza.secnetix.de> References: <200701081420.07376.jhb@freebsd.org> <200701081948.l08JmeS5069496@lurza.secnetix.de> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 08 Jan 2007 14:04:07 -0700 (MST) Cc: erik.udo@gmail.com, freebsd-hackers@FreeBSD.org, dougb@FreeBSD.org, jhb@FreeBSD.org Subject: Re: Init.c, making it chroot X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2007 21:07:15 -0000 In message: <200701081948.l08JmeS5069496@lurza.secnetix.de> Oliver Fromme 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.' : :