HomeFreeBSD

MFC r335642, r335651: config(8) envvar support

Description

MFC r335642, r335651: config(8) envvar support

r335642:
config(8): Add envvar support

envvar allows adding individual environment variables to the kernel's static
environment without the overhead of pulling in a full file. envvar in a
config looks like:

envvar some_var=5

All envvar-provided variables will be added after the env file is processed,
so envvar keys that exist in the previous env will be overwritten by
whatever value is set here in the kernel configuration directly.

As an aside, envvar lines are intentionally tokenized differently from
basically every other line. We used a named state when ENVVAR is encountered
to gobble up the rest of the line, which will later be cleaned and validated
in post-processing by sanitize_envline. This turns out to be the simplest
and cleanest way to allow the flexibility that kenv does while not
compromising on silly hacks.

r335651:
config(8): Set envmode if we accept an envvar

Details

Provenance
kevansAuthored on
Parents
rS335862: Document that syslogd -v has no effect when RFC 5424 mode is enabled.
Branches
Unknown
Tags
Unknown