Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/sysrc/sysrc.8
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd February 2, 2016 | .Dd February 26, 2019 | ||||
.Dt SYSRC 8 | .Dt SYSRC 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm sysrc | .Nm sysrc | ||||
.Nd safely edit system rc files | .Nd safely edit system rc files | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl cdDeEFhinNqvx | .Op Fl cdDeEFhinNqvx | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | |||||
.It Fl N | .It Fl N | ||||
Show only variable names, not their values. | Show only variable names, not their values. | ||||
.It Fl q | .It Fl q | ||||
Quiet. | Quiet. | ||||
Disable verbose and hide certain errors. | Disable verbose and hide certain errors. | ||||
When combined with | When combined with | ||||
.Sq Fl L | .Sq Fl L | ||||
and one or more | and one or more | ||||
.Li Ar name | .Ar name | ||||
arguments, provide only exit status and no output. | arguments, provide only exit status and no output. | ||||
.It Fl R Ar dir | .It Fl R Ar dir | ||||
Operate within the root directory | Operate within the root directory | ||||
.Sq Ar dir | .Sq Ar dir | ||||
rather than | rather than | ||||
.Sq / . | .Sq / . | ||||
.It Fl s Ar name | .It Fl s Ar name | ||||
If an | If an | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
.Xr rc.conf 5 | .Xr rc.conf 5 | ||||
configuration files. | configuration files. | ||||
.Pp | .Pp | ||||
The list of system configuration files is configured in the file | The list of system configuration files is configured in the file | ||||
.Ql /etc/defaults/rc.conf | .Ql /etc/defaults/rc.conf | ||||
within the variable | within the variable | ||||
.Ql rc_conf_files , | .Ql rc_conf_files , | ||||
which by-default contains a space-separated list of pathnames. | which by-default contains a space-separated list of pathnames. | ||||
On all FreeBSD | On all | ||||
.Fx | |||||
systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". | systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". | ||||
Each | Each | ||||
pathname is sourced in-order upon startup. | pathname is sourced in-order upon startup. | ||||
It is in the same fashion that | It is in the same fashion that | ||||
.Nm | .Nm | ||||
sources the configuration files before returning the value of the given | sources the configuration files before returning the value of the given | ||||
variable. | variable. | ||||
.Pp | .Pp | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
is not found in the existing value for | is not found in the existing value for | ||||
.Va cloned_interfaces , | .Va cloned_interfaces , | ||||
it is added | it is added | ||||
.Pq with delimiter only if existing value is non-NULL . | .Pq with delimiter only if existing value is non-NULL . | ||||
.Pp | .Pp | ||||
For convenience, if the first character is alpha-numeric | For convenience, if the first character is alpha-numeric | ||||
.Pq letters A-Z, a-z, or numbers 0-9 , | .Pq letters A-Z, a-z, or numbers 0-9 , | ||||
dot | dot | ||||
.Pq Li . , | .Pq Li \&. , | ||||
or slash | or slash | ||||
.Pq Li / , | .Pq Li / , | ||||
.Nm | .Nm | ||||
uses the default setting of whitespace as separator. | uses the default setting of whitespace as separator. | ||||
For example, the above and below statements are equivalent since | For example, the above and below statements are equivalent since | ||||
.Dq gif0 | .Dq gif0 | ||||
starts with an alpha-numeric character | starts with an alpha-numeric character | ||||
.Pq the letter Li g : | .Pq the letter Li g : | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
is found in the existing value for | is found in the existing value for | ||||
.Va cloned_interfaces , | .Va cloned_interfaces , | ||||
it is removed | it is removed | ||||
.Pq extra delimiters removed . | .Pq extra delimiters removed . | ||||
.Pp | .Pp | ||||
For convenience, if the first character is alpha-numeric | For convenience, if the first character is alpha-numeric | ||||
.Pq letters A-Z, a-z, or numbers 0-9 , | .Pq letters A-Z, a-z, or numbers 0-9 , | ||||
dot | dot | ||||
.Pq Li . , | .Pq Li \&. , | ||||
or slash | or slash | ||||
.Pq Li / , | .Pq Li / , | ||||
.Nm | .Nm | ||||
uses the default setting of whitespace as separator. | uses the default setting of whitespace as separator. | ||||
For example, the above and below statements are equivalent since | For example, the above and below statements are equivalent since | ||||
.Dq gif0 | .Dq gif0 | ||||
starts with an alpha-numeric character | starts with an alpha-numeric character | ||||
.Pq the letter Li g : | .Pq the letter Li g : | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
usbd_flags-"default" | usbd_flags-"default" | ||||
.Dl returns $usbd_flags or "default" if unset or NULL . | .Dl returns $usbd_flags or "default" if unset or NULL . | ||||
.Pp | .Pp | ||||
.Nm | .Nm | ||||
cloned_interfaces+"alternate" | cloned_interfaces+"alternate" | ||||
.Dl returns "alternate" if $cloned_interfaces is set . | .Dl returns "alternate" if $cloned_interfaces is set . | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr rc.conf 5 , | .Xr rc.conf 5 , | ||||
.Xr rc.subr 8 , | |||||
.Xr jail 8 , | .Xr jail 8 , | ||||
.Xr jexec 8 , | .Xr jexec 8 , | ||||
.Xr jls 8 , | .Xr jls 8 , | ||||
.Xr rc 8 , | .Xr rc 8 , | ||||
.Xr rc.subr 8 , | |||||
.Xr sysctl 8 | .Xr sysctl 8 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
A | A | ||||
.Nm | .Nm | ||||
utility first appeared in | utility first appeared in | ||||
.Fx 9.2 . | .Fx 9.2 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.An Devin Teske Aq Mt dteske@FreeBSD.org | .An Devin Teske Aq Mt dteske@FreeBSD.org | ||||
.Sh THANKS TO | .Sh THANKS TO | ||||
Brandon Gooch, Ngie Cooper, Julian Elischer, Pawel Jakub Dawidek, | Brandon Gooch, Ngie Cooper, Julian Elischer, Pawel Jakub Dawidek, | ||||
Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, Jilles Tjoelker, | Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, Jilles Tjoelker, | ||||
Allan Jude, and Lars Engels for suggestions, help, and testing. | Allan Jude, and Lars Engels for suggestions, help, and testing. |