Changeset View
Changeset View
Standalone View
Standalone View
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 March 4, 2015 | .Dd September 1, 2015 | ||||
.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 | ||||
.Fl l | |||||
.Op Fl s Ar name Op Fl D | |||||
.Op Fl f Ar file | |||||
.Nm | |||||
.Op Fl cdDeFhinNqvx | .Op Fl cdDeFhinNqvx | ||||
.Op Fl s Ar name | |||||
.Op Fl f Ar file | .Op Fl f Ar file | ||||
.Op Fl j Ar jail | Fl R Ar dir | .Op Fl j Ar jail | Fl R Ar dir | ||||
.Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value | .Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value | ||||
.Ar ... | .Ar ... | ||||
.Nm | .Nm | ||||
.Op Fl cdDeFhinNqvx | .Op Fl cdDeFhinNqvx | ||||
.Op Fl s Ar name | |||||
.Op Fl f Ar file | .Op Fl f Ar file | ||||
.Op Fl j Ar jail | Fl R Ar dir | .Op Fl j Ar jail | Fl R Ar dir | ||||
.Fl a | A | .Fl a | A | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility retrieves | utility retrieves | ||||
.Xr rc.conf 5 | .Xr rc.conf 5 | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
Ignore unknown variables. | Ignore unknown variables. | ||||
.It Fl j Ar jail | .It Fl j Ar jail | ||||
The | The | ||||
.Ar jid | .Ar jid | ||||
or name of the | or name of the | ||||
.Ar jail | .Ar jail | ||||
to operate within | to operate within | ||||
.Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . | .Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . | ||||
.It Fl l | |||||
Print the list of configuration files to stdout and exit. | |||||
.It Fl n | .It Fl n | ||||
Show only variable values, not their names. | Show only variable values, not their names. | ||||
.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. | ||||
.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 | |||||
If an | |||||
.Li rc.d | |||||
script of | |||||
.Ar name | |||||
exists | |||||
.Po | |||||
in | |||||
.Dq /etc/rc.d | |||||
or | |||||
.Li local_startup | |||||
directories | |||||
.Pc , | |||||
process its | |||||
.Dq rc.conf.d | |||||
entries as potential overrides to | |||||
.Sq rc_conf_files . | |||||
See | |||||
.Xr rc.subr 8 | |||||
for additional information on | |||||
.Dq rc.conf.d . | |||||
Can be combined with | |||||
.Sq Fl l Fl D | |||||
to print a list of only | |||||
.Dq rc.conf.d | |||||
entries for | |||||
.Ar name . | |||||
.It Fl v | .It Fl v | ||||
Verbose. | Verbose. | ||||
Print the pathname of the specific | Print the pathname of the specific | ||||
.Xr rc.conf 5 | .Xr rc.conf 5 | ||||
file where the directive was found. | file where the directive was found. | ||||
.It Fl -version | .It Fl -version | ||||
Print version information to stdout and exit. | Print version information to stdout and exit. | ||||
.It Fl x | .It Fl x | ||||
▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
.Nm | .Nm | ||||
\&'hostname?' | \&'hostname?' | ||||
.Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . | .Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . | ||||
.Pp | .Pp | ||||
.Nm | .Nm | ||||
\&'hostname:?' | \&'hostname:?' | ||||
.Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . | .Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . | ||||
.Sh LIMITATIONS | |||||
The | |||||
.Nm | |||||
utility presently does not support the | |||||
.Ql rc.conf.d | |||||
collection of system configuration files | |||||
.Pq which requires a service name to be known during execution . | |||||
.Pp | |||||
This will be corrected by a future enhancement. | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr jls 1 , | .Xr jls 1 , | ||||
.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 rc 8 , | .Xr rc 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, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, | Brandon Gooch, Garrett 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. |