From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 27 08:45:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 122C416A4CE for ; Tue, 27 Jan 2004 08:45:03 -0800 (PST) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DE4E43D54 for ; Tue, 27 Jan 2004 08:44:38 -0800 (PST) (envelope-from craig@tobuj.gank.org) Received: from localhost (ion.gank.org [69.55.238.164]) by ion.gank.org (mail) with ESMTP id B929A2B4E3; Tue, 27 Jan 2004 10:44:04 -0600 (CST) Received: from ion.gank.org ([69.55.238.164]) by localhost (ion.gank.org [69.55.238.164]) (amavisd-new, port 10024) with LMTP id 58982-01; Tue, 27 Jan 2004 10:44:03 -0600 (CST) Received: from owen1492.uf.corelab.com (pix.corelab.com [12.45.169.2]) by ion.gank.org (mail) with ESMTP id 5FA522A95D; Tue, 27 Jan 2004 10:44:03 -0600 (CST) From: Craig Boston To: "Reinier Kleipool" , Date: Tue, 27 Jan 2004 10:43:59 -0600 User-Agent: KMail/1.5.4 References: <000001c3a6df$60ef28f0$5201a8c0@ovs.kleipool.org> In-Reply-To: <000001c3a6df$60ef28f0$5201a8c0@ovs.kleipool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401271043.59774.craig@tobuj.gank.org> X-Virus-Scanned: by amavisd-new at gank.org Subject: Re: kernel enviroment in sysctl MIB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 16:45:03 -0000 On Sunday 09 November 2003 10:34 am, Reinier Kleipool wrote: > I am investigating the possiblilies for looking at the kernel boot > parameters from within a userland utility. (Possibly a new FreeBSD install > facility) The idea is that by looking at sysctl kern.environment.* you > should be able to see the BTX variables. An install program could use this > to see an INSTALL_SERVER=install.company.com variable (etc...) to use as > install server. The BTX loader could provide these variables at install > boot time, thus enableing fully automated installs. I've been using the 'kenv' program for some time to do this. For my purposes it seems to work quite well (have loader display a menu with an option of whether or not to start X after bootup). It seems to do the trick for me -- if you need it from a program rather than a shell script you may want to look at the source for kenv(1) to see how it gets its information. Craig