Date: Tue, 27 Jan 2004 10:43:59 -0600 From: Craig Boston <craig@tobuj.gank.org> To: "Reinier Kleipool" <Reinier@Kleipool.org>, <freebsd-hackers@freebsd.org> Subject: Re: kernel enviroment in sysctl MIB Message-ID: <200401271043.59774.craig@tobuj.gank.org> In-Reply-To: <000001c3a6df$60ef28f0$5201a8c0@ovs.kleipool.org> References: <000001c3a6df$60ef28f0$5201a8c0@ovs.kleipool.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401271043.59774.craig>