kernel enviroment in sysctl MIB
Peter Pentchev
roam at ringlet.net
Wed Nov 12 07:31:10 PST 2003
On Wed, Nov 12, 2003 at 05:00:54PM +0200, Peter Pentchev wrote:
> On Tue, Nov 11, 2003 at 06:01:55PM +0100, Reinier Kleipool wrote:
> > Hello,
> >
> > 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.
> [snip]
> > My question is this: When looking at kern/kern_environmet.c I see routines
> > that install a SYSCTL_NODE kern.environment. The sysctl_kernenv routine
> > handles this node. What I do not understand is how the environment is
> > returned from this routine.
>
> Take a look at the kenv(1) utility - its source is in the
> src/usr.bin/kenv/kenv.c file.
Errr, of course, if you're working with FreeBSD 5.x after 2003/01/20,
that would be src/bin/kenv/kenv.c :)
G'luck,
Peter
--
Peter Pentchev roam at ringlet.net roam at sbnd.net roam at FreeBSD.org
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
Nostalgia ain't what it used to be.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20031112/f6c67d29/attachment.bin
More information about the freebsd-hackers
mailing list