summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysrc/sysrc.8
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-11-07 23:00:11 +0000
committerdteske <dteske@FreeBSD.org>2013-11-07 23:00:11 +0000
commita920b12f85918c1b546cb81aa622af668b62d348 (patch)
treeb2e5faa6a8f0182f0ae84f43c029a7b717282112 /usr.sbin/sysrc/sysrc.8
parent9508d6508702030737d90721f168dae31daaa750 (diff)
downloadFreeBSD-src-a920b12f85918c1b546cb81aa622af668b62d348.zip
FreeBSD-src-a920b12f85918c1b546cb81aa622af668b62d348.tar.gz
Add a `-c' option for `check only' to determine if a value is set
(get command) or if the current value is the same as what is desired (set command). In those cases, the return status is success. Otherwise, if the variable is unset (get command) or set to a different value that what is desired (set command), returns with error status. This is useful for puppet integration as well as everyday scripting.
Diffstat (limited to 'usr.sbin/sysrc/sysrc.8')
-rw-r--r--usr.sbin/sysrc/sysrc.810
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8
index 0a4aace..6d53e19 100644
--- a/usr.sbin/sysrc/sysrc.8
+++ b/usr.sbin/sysrc/sysrc.8
@@ -32,13 +32,13 @@
.Nd safely edit system rc files
.Sh SYNOPSIS
.Nm
-.Op Fl dDeFhinNqvx
+.Op Fl cdDeFhinNqvx
.Op Fl f Ar file
.Op Fl j Ar jail | Fl R Ar dir
.Ar name Ns Op = Ns Ar value
.Ar ...
.Nm
-.Op Fl dDeFhinNqvx
+.Op Fl cdDeFhinNqvx
.Op Fl f Ar file
.Op Fl j Ar jail | Fl R Ar dir
.Fl a | A
@@ -57,6 +57,12 @@ Dump a list of all non-default configuration variables.
.It Fl A
Dump a list of all configuration variables
.Pq incl. defaults .
+.It Fl c
+Check if the value will change when assigning a new value.
+If verbose
+.Pq see Dq Fl v
+prints a message stating whether a change would occur.
+Exits with success if no change is necessary, else returns error status.
.It Fl d
Print a description of the given variable.
.It Fl D
OpenPOWER on IntegriCloud