Add sysrc(8) support for "rc.conf.d" file(s) when given "-s name" to
indicate service(8) script. While here, add "-l" option for listing the set of configuration file(s) considered (in order; separated by space). Also add "-L" for exploring all configuration files and "-E" to omit files that don't exist from operations. Differential Revision: https://reviews.freebsd.org/D3551 Reviewed by: allanjude MFC after: 1 week X-MFC-to: stable/10 Relnotes: yes
This commit is contained in:
parent
0755c17500
commit
4fb1de4304
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=290337
@ -40,18 +40,23 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
|
|||||||
#
|
#
|
||||||
# Version information
|
# Version information
|
||||||
#
|
#
|
||||||
SYSRC_VERSION="6.5 Sep-1,2015"
|
SYSRC_VERSION="7.0 Sep-13,2015"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Options
|
# Options
|
||||||
#
|
#
|
||||||
CHECK_ONLY=
|
CHECK_ONLY=
|
||||||
|
DEFAULT=
|
||||||
DELETE=
|
DELETE=
|
||||||
DESCRIBE=
|
DESCRIBE=
|
||||||
|
EXISTING_ONLY=
|
||||||
IGNORE_UNKNOWNS=
|
IGNORE_UNKNOWNS=
|
||||||
JAIL=
|
JAIL=
|
||||||
|
LIST_SERVICE_CONFS=
|
||||||
|
LIST_CONFS=
|
||||||
QUIET=
|
QUIET=
|
||||||
ROOTDIR=
|
ROOTDIR=
|
||||||
|
SERVICE=
|
||||||
SHOW_ALL=
|
SHOW_ALL=
|
||||||
SHOW_EQUALS=
|
SHOW_EQUALS=
|
||||||
SHOW_FILE=
|
SHOW_FILE=
|
||||||
@ -80,7 +85,8 @@ die()
|
|||||||
#
|
#
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm"
|
f_err "Usage: %s [OPTIONS] %s\n" "$pgm" \
|
||||||
|
"{name[[+|-]=value] ... | -a | -A | -l | -L [name ...]}"
|
||||||
f_err "Try \`%s --help' for more information.\n" "$pgm"
|
f_err "Try \`%s --help' for more information.\n" "$pgm"
|
||||||
die
|
die
|
||||||
}
|
}
|
||||||
@ -95,6 +101,8 @@ help()
|
|||||||
local envfmt="\t%-17s%s\n"
|
local envfmt="\t%-17s%s\n"
|
||||||
|
|
||||||
f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm"
|
f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm"
|
||||||
|
f_err "Usage: %s [OPTIONS] -a | -A\n" "$pgm"
|
||||||
|
f_err "Usage: %s [OPTIONS] -l | -L [name ...]\n" "$pgm"
|
||||||
|
|
||||||
f_err "OPTIONS:\n"
|
f_err "OPTIONS:\n"
|
||||||
f_err "$optfmt" "-a" \
|
f_err "$optfmt" "-a" \
|
||||||
@ -113,6 +121,8 @@ help()
|
|||||||
"Print query results as \`var=value' (useful for producing"
|
"Print query results as \`var=value' (useful for producing"
|
||||||
f_err "$optfmt" "" \
|
f_err "$optfmt" "" \
|
||||||
"output to be fed back in). Ignored if \`-n' is specified."
|
"output to be fed back in). Ignored if \`-n' is specified."
|
||||||
|
f_err "$optfmt" "-E" \
|
||||||
|
"Existing files only with \`-[lL]' or when changing a setting."
|
||||||
f_err "$optfmt" "-f file" \
|
f_err "$optfmt" "-f file" \
|
||||||
"Operate on the specified file(s) instead of rc_conf_files."
|
"Operate on the specified file(s) instead of rc_conf_files."
|
||||||
f_err "$optfmt" "" \
|
f_err "$optfmt" "" \
|
||||||
@ -129,12 +139,20 @@ help()
|
|||||||
"The jid or name of the jail to operate within (overrides"
|
"The jid or name of the jail to operate within (overrides"
|
||||||
f_err "$optfmt" "" \
|
f_err "$optfmt" "" \
|
||||||
"\`-R dir'; requires jexec(8))."
|
"\`-R dir'; requires jexec(8))."
|
||||||
|
f_err "$optfmt" "-l" \
|
||||||
|
"List configuration files used at startup on stdout and exit."
|
||||||
|
f_err "$optfmt" "-L" \
|
||||||
|
"List all configuration files including rc.conf.d entries."
|
||||||
f_err "$optfmt" "-n" \
|
f_err "$optfmt" "-n" \
|
||||||
"Show only variable values, not their names."
|
"Show only variable values, not their names."
|
||||||
f_err "$optfmt" "-N" \
|
f_err "$optfmt" "-N" \
|
||||||
"Show only variable names, not their values."
|
"Show only variable names, not their values."
|
||||||
f_err "$optfmt" "-q" \
|
f_err "$optfmt" "-q" \
|
||||||
"Quiet. Disable verbose and hide certain errors."
|
"Quiet. Disable verbose and hide certain errors."
|
||||||
|
f_err "$optfmt" "-s name" \
|
||||||
|
"Process additional \`rc.conf.d' entries for service name."
|
||||||
|
f_err "$optfmt" "" \
|
||||||
|
"Ignored if \`-f file' is given."
|
||||||
f_err "$optfmt" "-R dir" \
|
f_err "$optfmt" "-R dir" \
|
||||||
"Operate within the root directory \`dir' rather than \`/'."
|
"Operate within the root directory \`dir' rather than \`/'."
|
||||||
f_err "$optfmt" "-v" \
|
f_err "$optfmt" "-v" \
|
||||||
@ -245,27 +263,33 @@ unset arg
|
|||||||
#
|
#
|
||||||
# Process command-line flags
|
# Process command-line flags
|
||||||
#
|
#
|
||||||
while getopts aAcdDef:Fhij:nNqR:vxX flag; do
|
while getopts aAcdDeEf:Fhij:lLnNqR:s:vxX flag; do
|
||||||
case "$flag" in
|
case "$flag" in
|
||||||
a) SHOW_ALL=${SHOW_ALL:-1} ;;
|
a) SHOW_ALL=${SHOW_ALL:-1} ;;
|
||||||
A) SHOW_ALL=2 ;;
|
A) SHOW_ALL=2 ;;
|
||||||
c) CHECK_ONLY=1 ;;
|
c) CHECK_ONLY=1 ;;
|
||||||
d) DESCRIBE=1 ;;
|
d) DESCRIBE=1 ;;
|
||||||
D) RC_CONFS= ;;
|
D) DEFAULT=1 RC_CONFS= ;;
|
||||||
e) SHOW_EQUALS=1 ;;
|
e) SHOW_EQUALS=1 ;;
|
||||||
f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;;
|
E) EXISTING_ONLY=1 ;;
|
||||||
|
f) DEFAULT= RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;;
|
||||||
F) SHOW_FILE=1 ;;
|
F) SHOW_FILE=1 ;;
|
||||||
h) usage ;; # NOTREACHED
|
h) usage ;; # NOTREACHED
|
||||||
i) IGNORE_UNKNOWNS=1 ;;
|
i) IGNORE_UNKNOWNS=1 ;;
|
||||||
j) [ "$OPTARG" ] ||
|
j) [ "$OPTARG" ] ||
|
||||||
die "%s: Missing or null argument to \`-j' flag" "$pgm"
|
die "%s: Missing or null argument to \`-j' flag" "$pgm"
|
||||||
JAIL="$OPTARG" ;;
|
JAIL="$OPTARG" ;;
|
||||||
|
l) LIST_CONFS=1 ;;
|
||||||
|
L) LIST_SERVICE_CONFS=1 ;;
|
||||||
n) SHOW_NAME= ;;
|
n) SHOW_NAME= ;;
|
||||||
N) SHOW_VALUE= ;;
|
N) SHOW_VALUE= ;;
|
||||||
q) QUIET=1 VERBOSE= ;;
|
q) QUIET=1 VERBOSE= ;;
|
||||||
R) [ "$OPTARG" ] ||
|
R) [ "$OPTARG" ] ||
|
||||||
die "%s: Missing or null argument to \`-R' flag" "$pgm"
|
die "%s: Missing or null argument to \`-R' flag" "$pgm"
|
||||||
ROOTDIR="$OPTARG" ;;
|
ROOTDIR="$OPTARG" ;;
|
||||||
|
s) [ "$OPTARG" ] ||
|
||||||
|
die "%s: Missing or null argument to \`-s' flag" "$pgm"
|
||||||
|
SERVICE="$OPTARG" ;;
|
||||||
v) VERBOSE=1 QUIET= ;;
|
v) VERBOSE=1 QUIET= ;;
|
||||||
x) DELETE=${DELETE:-1} ;;
|
x) DELETE=${DELETE:-1} ;;
|
||||||
X) DELETE=2 ;;
|
X) DELETE=2 ;;
|
||||||
@ -274,6 +298,129 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag; do
|
|||||||
done
|
done
|
||||||
shift $(( $OPTIND - 1 ))
|
shift $(( $OPTIND - 1 ))
|
||||||
|
|
||||||
|
#
|
||||||
|
# Process `-L' flag
|
||||||
|
#
|
||||||
|
if [ "$LIST_SERVICE_CONFS" ]; then
|
||||||
|
list=
|
||||||
|
|
||||||
|
#
|
||||||
|
# List rc_conf_files if no service names given
|
||||||
|
#
|
||||||
|
files=
|
||||||
|
[ $# -eq 0 ] && files=$( f_sysrc_get rc_conf_files )
|
||||||
|
for file in $files; do
|
||||||
|
if [ "$EXISTING_ONLY" ]; then
|
||||||
|
[ -e "$file" -a ! -d "$file" ] || continue
|
||||||
|
fi
|
||||||
|
case "$list" in
|
||||||
|
"$file"|*" $file"|"$file "*|*" $file "*) continue ;;
|
||||||
|
esac
|
||||||
|
list="$list $file"
|
||||||
|
done
|
||||||
|
list="${list# }"
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
if [ "$VERBOSE" ]; then
|
||||||
|
echo rc_conf_files: $list
|
||||||
|
elif [ "$SHOW_EQUALS" ]; then
|
||||||
|
echo "rc_conf_files=\"$list\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# List rc.conf.d entries
|
||||||
|
#
|
||||||
|
retval=$SUCCESS
|
||||||
|
for service in ${*:-$( service -l )}; do
|
||||||
|
slist=
|
||||||
|
f_sysrc_service_configs $service files || retval=$? continue
|
||||||
|
for file in $files; do
|
||||||
|
if [ "$EXISTING_ONLY" ]; then
|
||||||
|
[ -e "$file" -a ! -d "$file" ] || continue
|
||||||
|
fi
|
||||||
|
if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then
|
||||||
|
case "$list" in
|
||||||
|
"$file"|*" $file"|"$file "*|*" $file "*)
|
||||||
|
continue ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
slist="$slist $file"
|
||||||
|
done
|
||||||
|
slist="${slist# }"
|
||||||
|
if [ $# -gt 0 ]; then
|
||||||
|
[ "$slist" ] || retval=$?
|
||||||
|
fi
|
||||||
|
if [ "$VERBOSE" ]; then
|
||||||
|
[ "$slist" ] && echo "$service: $slist"
|
||||||
|
continue
|
||||||
|
elif [ "$SHOW_EQUALS" ]; then
|
||||||
|
[ "$slist" ] && echo "$service=\"$slist\""
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
list="$list${slist:+ }$slist"
|
||||||
|
done
|
||||||
|
if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then
|
||||||
|
if [ $# -eq 0 -o ! "$QUIET" ]; then
|
||||||
|
list="${list# }"
|
||||||
|
[ "$list" ] && echo $list
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $retval
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Process `-s name' argument
|
||||||
|
#
|
||||||
|
if [ "$SERVICE" -a ! "${RC_CONFS+set}" ]; then
|
||||||
|
if f_sysrc_service_configs "$SERVICE" RC_CONFS; then
|
||||||
|
rc_conf_files=$( f_sysrc_get rc_conf_files )
|
||||||
|
RC_CONFS="$rc_conf_files${RC_CONFS:+ }$RC_CONFS"
|
||||||
|
unset rc_conf_files
|
||||||
|
else
|
||||||
|
unset RC_CONFS
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Process `-E' option flag
|
||||||
|
#
|
||||||
|
if [ "$EXISTING_ONLY" ]; then
|
||||||
|
#
|
||||||
|
# To get f_sysrc_*() to ignore missing rc_conf_files, we have to use
|
||||||
|
# RC_CONFS to override the unpreened value. If RC_CONFS already has a
|
||||||
|
# value (`-D', `-f file', `-s name', or inherited from parent), use it.
|
||||||
|
# Otherwise, include filtered contents of rc_conf_files.
|
||||||
|
#
|
||||||
|
RC_CONFS=$(
|
||||||
|
if [ "${RC_CONFS+set}" ]; then
|
||||||
|
set -- $RC_CONFS
|
||||||
|
else
|
||||||
|
set -- $( f_sysrc_get rc_conf_files )
|
||||||
|
fi
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
[ -f "$1" ] && echo -n " $1"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
)
|
||||||
|
RC_CONFS="${RC_CONFS# }"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Process `-l' option flag
|
||||||
|
#
|
||||||
|
if [ "$LIST_CONFS" ]; then
|
||||||
|
[ $# -eq 0 ] || usage
|
||||||
|
if [ "$DEFAULT" ]; then
|
||||||
|
echo "$RC_DEFAULTS"
|
||||||
|
elif [ "${RC_CONFS+set}" ]; then
|
||||||
|
echo "$RC_CONFS"
|
||||||
|
else
|
||||||
|
f_sysrc_get rc_conf_files
|
||||||
|
fi
|
||||||
|
exit $SUCCESS
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# [More] Sanity checks (e.g., "sysrc --")
|
# [More] Sanity checks (e.g., "sysrc --")
|
||||||
#
|
#
|
||||||
@ -344,6 +491,10 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then
|
|||||||
$( [ "$SHOW_ALL" = "1" ] && echo \ -a )
|
$( [ "$SHOW_ALL" = "1" ] && echo \ -a )
|
||||||
$( [ "$SHOW_ALL" = "2" ] && echo \ -A )
|
$( [ "$SHOW_ALL" = "2" ] && echo \ -A )
|
||||||
${CHECK_ONLY:+-c}
|
${CHECK_ONLY:+-c}
|
||||||
|
${DEFAULT:+-D}
|
||||||
|
${EXISTING_ONLY:+-E}
|
||||||
|
${LIST_CONFS:+-l}
|
||||||
|
${LIST_SERVICE_CONFS:+-L}
|
||||||
${DESCRIBE:+-d}
|
${DESCRIBE:+-d}
|
||||||
${SHOW_EQUALS:+-e}
|
${SHOW_EQUALS:+-e}
|
||||||
${IGNORE_UNKNOWNS:+-i}
|
${IGNORE_UNKNOWNS:+-i}
|
||||||
@ -351,6 +502,11 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then
|
|||||||
$( [ "$SHOW_VALUE" ] || echo \ -N )
|
$( [ "$SHOW_VALUE" ] || echo \ -N )
|
||||||
$( [ "$SHOW_FILE" ] && echo \ -F )
|
$( [ "$SHOW_FILE" ] && echo \ -F )
|
||||||
"
|
"
|
||||||
|
if [ "$SERVICE" ]; then
|
||||||
|
escape "$SERVICE" _SERVICE
|
||||||
|
args="$args -s '$_SERVICE'"
|
||||||
|
unset _SERVICE
|
||||||
|
fi
|
||||||
if [ "${RC_CONFS+set}" ]; then
|
if [ "${RC_CONFS+set}" ]; then
|
||||||
escape "$RC_CONFS" _RC_CONFS
|
escape "$RC_CONFS" _RC_CONFS
|
||||||
args="$args -f '$_RC_CONFS'"
|
args="$args -f '$_RC_CONFS'"
|
||||||
@ -454,9 +610,10 @@ if [ "$SHOW_ALL" ]; then
|
|||||||
#
|
#
|
||||||
IFS="$IFS|"
|
IFS="$IFS|"
|
||||||
EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP"
|
EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP"
|
||||||
EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME"
|
EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME|DEFAULT"
|
||||||
EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS"
|
EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS|SERVICE"
|
||||||
EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY"
|
EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY|EXISTING_ONLY"
|
||||||
|
EXCEPT="$EXCEPT|LIST_CONFS|LIST_SERVICE_CONFS"
|
||||||
EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk"
|
EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk"
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -479,7 +636,13 @@ if [ "$SHOW_ALL" ]; then
|
|||||||
# explicit value, modifying the default behavior of
|
# explicit value, modifying the default behavior of
|
||||||
# source_rc_confs().
|
# source_rc_confs().
|
||||||
#
|
#
|
||||||
[ "${RC_CONFS+set}" ] && rc_conf_files="$RC_CONFS"
|
if [ "${RC_CONFS+set}" ]; then
|
||||||
|
[ "$SHOW_ALL" = "1" -a "$SERVICE" -a \
|
||||||
|
! "$DEFAULT" ] || rc_conf_files=
|
||||||
|
rc_conf_files="$rc_conf_files $RC_CONFS"
|
||||||
|
rc_conf_files="${rc_conf_files# }"
|
||||||
|
rc_conf_files="${rc_conf_files% }"
|
||||||
|
fi
|
||||||
|
|
||||||
source_rc_confs
|
source_rc_confs
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 2, 2015
|
.Dd September 12, 2015
|
||||||
.Dt SYSRC 8
|
.Dt SYSRC 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -32,16 +32,27 @@
|
|||||||
.Nd safely edit system rc files
|
.Nd safely edit system rc files
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl cdDeFhinNqvx
|
.Op Fl cdDeEFhinNqvx
|
||||||
|
.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 cdDeEFhinNqvx
|
||||||
|
.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
|
||||||
|
.Nm
|
||||||
|
.Op Fl E
|
||||||
|
.Op Fl s Ar name
|
||||||
|
.Op Fl f Ar file
|
||||||
|
.Fl l
|
||||||
|
.Nm
|
||||||
|
.Op Fl eEqv
|
||||||
|
.Fl L
|
||||||
|
.Op Ar name ...
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
@ -81,6 +92,13 @@ Ignored if either
|
|||||||
or
|
or
|
||||||
.Ql Fl F
|
.Ql Fl F
|
||||||
is specified.
|
is specified.
|
||||||
|
.It Fl E
|
||||||
|
When given
|
||||||
|
.Sq Fl l
|
||||||
|
or
|
||||||
|
.Sq Fl L
|
||||||
|
to list configuration files, only list those that exist.
|
||||||
|
When changing a setting, prefer to modify existing files.
|
||||||
.It Fl f Ar file
|
.It Fl f Ar file
|
||||||
Operate on the specified file(s) instead of the files obtained by reading the
|
Operate on the specified file(s) instead of the files obtained by reading the
|
||||||
.Sq rc_conf_files
|
.Sq rc_conf_files
|
||||||
@ -105,6 +123,17 @@ 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
|
||||||
|
List configuration files used at startup on stdout and exit.
|
||||||
|
.It Fl L
|
||||||
|
List all configuration files including rc.conf.d entries on stdout and exit.
|
||||||
|
Can be combined with
|
||||||
|
.Sq Fl v
|
||||||
|
or
|
||||||
|
.Sq Fl e
|
||||||
|
to show service names.
|
||||||
|
.Nm
|
||||||
|
exits with success if all named services are installed, failure otherwise.
|
||||||
.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
|
||||||
@ -112,11 +141,40 @@ 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
|
||||||
|
.Sq Fl L
|
||||||
|
and one or more
|
||||||
|
.Li Ar name
|
||||||
|
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
|
||||||
|
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
|
||||||
|
to list configuration files used by service at startup.
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Verbose.
|
Verbose.
|
||||||
Print the pathname of the specific
|
Print the pathname of the specific
|
||||||
@ -336,6 +394,10 @@ and
|
|||||||
.It Pa /etc/defaults/rc.conf
|
.It Pa /etc/defaults/rc.conf
|
||||||
.It Pa /etc/rc.conf
|
.It Pa /etc/rc.conf
|
||||||
.It Pa /etc/rc.conf.local
|
.It Pa /etc/rc.conf.local
|
||||||
|
.It Pa /etc/rc.conf.d/name
|
||||||
|
.It Pa /etc/rc.conf.d/name/*
|
||||||
|
.It Pa /usr/local/etc/rc.conf.d/name
|
||||||
|
.It Pa /usr/local/etc/rc.conf.d/name/*
|
||||||
.El
|
.El
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
Below are some simple examples of how
|
Below are some simple examples of how
|
||||||
@ -397,6 +459,7 @@ cloned_interfaces+"alternate"
|
|||||||
.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 ,
|
||||||
|
Loading…
Reference in New Issue
Block a user