Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2003 17:31:07 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Reinier Kleipool <Reinier@Kleipool.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: kernel enviroment in sysctl MIB
Message-ID:  <20031112153107.GB453@straylight.oblivion.bg>
In-Reply-To: <20031112150054.GA453@straylight.oblivion.bg>
References:  <001701c3a875$836b1960$5201a8c0@ovs.kleipool.org> <20031112150054.GA453@straylight.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help

--rJwd6BRFiFCcLxzm
Content-Type: text/plain; charset=windows-1251
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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,
> >=20
> >   I am investigating the possiblilies for looking at the kernel boot
> > parameters from within a userland utility. (Possibly a new FreeBSD inst=
all
> > 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 t=
his
> > to see an INSTALL_SERVER=3Dinstall.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 routi=
nes
> > 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.
>=20
> 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

--=20
Peter Pentchev	roam@ringlet.net    roam@sbnd.net    roam@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.

--rJwd6BRFiFCcLxzm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/slI67Ri2jRYZRVMRAlKbAJ9e1sWG1XP8CgsIM3sCYuTnXldq2gCgod+T
fB1taa7TpF7tra+f851r4eM=
=CO3d
-----END PGP SIGNATURE-----

--rJwd6BRFiFCcLxzm--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031112153107.GB453>