aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysrc/sysrc.8
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sysrc/sysrc.8')
-rw-r--r--usr.sbin/sysrc/sysrc.889
1 files changed, 41 insertions, 48 deletions
diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8
index bdf3353c2cf9..cb32f72ea587 100644
--- a/usr.sbin/sysrc/sysrc.8
+++ b/usr.sbin/sysrc/sysrc.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2011-2016 Devin Teske
.\" All rights reserved.
.\"
@@ -408,62 +411,52 @@ and
.It Pa /usr/local/etc/rc.conf.d/name/*
.El
.Sh EXAMPLES
-Below are some simple examples of how
-.Nm
-can be used to query certain values from the
-.Xr rc.conf 5
-collection of system configuration files:
-.Pp
-.Nm
-sshd_enable
-.Dl returns the value of $sshd_enable, usually YES or NO .
+.Ss Working with rc.conf files
+Ask the value of
+.Cm sshd_enable ,
+usually YES or NO:
+.Dl sysrc sshd_enable
.Pp
-.Nm
-defaultrouter
-.Dl returns IP address of default router Pq if configured .
-.Pp
-Working on other files, such as
+Return the IP address of default router
+.Pq if configured :
+.Dl sysrc defaultrouter
+.Ss Working with other files
+Return the value of the MAILTO setting, if configured, from
.Xr crontab 5 :
+.Dl sysrc -f /etc/crontab MAILTO
.Pp
-.Nm
--f /etc/crontab MAILTO
-.Dl returns the value of the MAILTO setting Pq if configured .
-.Pp
-Appending to existing values:
-.Pp
-.Nm
-\&cloned_interfaces+=gif0
-.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES .
-.Pp
-.Nm
-\&cloned_interfaces-=gif0
-.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES .
-.Pp
-In addition to the above syntax,
-.Nm
-also supports inline
-.Xr sh 1
-PARAMETER expansion for changing the way values are reported, shown below:
+Append
+.Dq gif0
+to $cloned_interfaces
+.Pq see Sx APPENDING VALUES :
+.Dl sysrc cloned_interfaces+=gif0
.Pp
-.Nm
-\&'hostname%%.*'
-.Dl returns $hostname up to (but not including) first `.' .
+Remove
+.Dq gif0
+from $cloned_interfaces
+.Pq see Sx SUBTRACTING VALUES :
+.Dl sysrc cloned_interfaces-=gif0
+.Ss Inline shell parameter expansion
+Return $hostname up to, but not including, first
+.Ql \&. :
+.Dl sysrc 'hostname%%.*'
.Pp
-.Nm
-\&'network_interfaces%%[$IFS]*'
-.Dl returns first word of $network_interfaces .
+Return first word of $network_interfaces:
+.Dl sysrc 'network_interfaces%%[$IFS]*'
.Pp
-.Nm
-\&'ntpdate_flags##*[$IFS]'
-.Dl returns last word of $ntpdate_flags (time server address) .
+Return last word of $ntpdate_flags
+.Pq time server address :
+.Dl sysrc 'ntpdate_flags##*[$IFS]'
.Pp
-.Nm
-usbd_flags-"default"
-.Dl returns $usbd_flags or "default" if unset or NULL .
+Return $usbd_flags or
+.Dq default
+if unset or NULL:
+.Dl sysrc usbd_flags-"default"
.Pp
-.Nm
-cloned_interfaces+"alternate"
-.Dl returns "alternate" if $cloned_interfaces is set .
+Return
+.Dq alternate
+if $cloned_interfaces is set:
+.Dl sysrc cloned_interfaces+"alternate"
.Sh SEE ALSO
.Xr rc.conf 5 ,
.Xr jail 8 ,