summaryrefslogtreecommitdiffstats
path: root/bin/kenv/kenv.1
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2012-05-11 23:05:14 +0000
committermdf <mdf@FreeBSD.org>2012-05-11 23:05:14 +0000
commitc0de32bfd62d07b0d35f6663622e9f20f00a58a9 (patch)
tree63662dcd5eba7b1d8bf0732b7cd8c563a66fca23 /bin/kenv/kenv.1
parentb09115511ca8b42b7a7d4ebdce274186bb43b29d (diff)
downloadFreeBSD-src-c0de32bfd62d07b0d35f6663622e9f20f00a58a9.zip
FreeBSD-src-c0de32bfd62d07b0d35f6663622e9f20f00a58a9.tar.gz
Add a -v and -N option to kenv(1), so it can be more easily used in
scripts the way sysctl(8) is. The -N option, like in sysctl(8), displays only the kenv names, not their values. The -v option prints an individual kenv variable name with its value as name="value". This is the inverse of sysctl(8)'s -n flag, since the default behaviour of kenv(1) is already like sysctl(8) -n. Submitted by: Garrett Cooper < yanegomi AT gmail DOT com > MFC after: 1 week
Diffstat (limited to 'bin/kenv/kenv.1')
-rw-r--r--bin/kenv/kenv.116
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/kenv/kenv.1 b/bin/kenv/kenv.1
index b31802b..310f918 100644
--- a/bin/kenv/kenv.1
+++ b/bin/kenv/kenv.1
@@ -32,9 +32,9 @@
.Nd dump or modify the kernel environment
.Sh SYNOPSIS
.Nm
-.Op Fl hq
+.Op Fl hNq
.Nm
-.Op Fl q
+.Op Fl qv
.Ar variable Ns Op = Ns Ar value
.Nm
.Op Fl q
@@ -54,6 +54,11 @@ name is specified,
.Nm
will only report that value.
If the
+.Fl N
+option is specified,
+.Nm
+will only display variable names and not their values.
+If the
.Fl u
option is specified,
.Nm
@@ -68,6 +73,13 @@ If the
option is set, warnings normally printed as a result of being unable to
perform the requested operation will be suppressed.
.Pp
+If the
+.Fl v
+option is set, the variable name will be printed out for the
+environment variable in addition to the value when
+.Nm
+is executed with a variable name.
+.Pp
Variables can be added to the kernel environment using the
.Pa /boot/loader.conf
file, or also statically compiled into the kernel using the statement
OpenPOWER on IntegriCloud