3 # Copyright (c) 2010-2018 Devin Teske
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 ############################################################ INCLUDES
31 # Prevent `-d' from being interpreted as a debug flag by common.subr
32 DEBUG_SELF_INITIALIZE=
34 BSDCFG_SHARE="/usr/share/bsdconfig"
35 [ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1
36 [ "$_SYSRC_SUBR" ] || f_include $BSDCFG_SHARE/sysrc.subr
38 ############################################################ GLOBALS
43 SYSRC_VERSION="7.2 Jun-16,2018"
67 ############################################################ FUNCTIONS
69 # die [$fmt [$opts ...]]
71 # Optionally print a message to stderr before exiting with failure status.
76 [ $# -gt 0 ] && shift 1
77 [ "$fmt" ] && f_err "$fmt\n" "$@"
84 # Prints a short syntax statement and exits.
88 f_err "Usage: %s [OPTIONS] %s\n" "$pgm" \
89 "{name[[+|-]=value] ... | -a | -A | -l | -L [name ...]}"
90 f_err "Try \`%s --help' for more information.\n" "$pgm"
96 # Prints a full syntax statement and exits.
100 local optfmt="\t%-11s%s\n"
101 local envfmt="\t%-17s%s\n"
103 f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm"
104 f_err "Usage: %s [OPTIONS] -a | -A\n" "$pgm"
105 f_err "Usage: %s [OPTIONS] -l | -L [name ...]\n" "$pgm"
108 f_err "$optfmt" "-a" \
109 "Dump a list of all non-default configuration variables."
110 f_err "$optfmt" "-A" \
111 "Dump a list of all configuration variables (incl. defaults)."
112 f_err "$optfmt" "-c" \
113 "Check. Return success if set or no changes, else error."
114 f_err "$optfmt" "-d" \
115 "Print a description of the given variable."
116 f_err "$optfmt" "-D" \
117 "Show default value(s) only (this is the same as setting"
119 "RC_CONFS to NULL or passing \`-f' with a NULL file-argument)."
120 f_err "$optfmt" "-e" \
121 "Print query results as \`var=value' (useful for producing"
123 "output to be fed back in). Ignored if \`-n' is specified."
124 f_err "$optfmt" "-E" \
125 "Existing files only with \`-[lL]' or when changing a setting."
126 f_err "$optfmt" "-f file" \
127 "Operate on the specified file(s) instead of rc_conf_files."
129 "Can be specified multiple times for additional files."
130 f_err "$optfmt" "-F" \
131 "Show only the last rc.conf(5) file each directive is in."
132 f_err "$optfmt" "-h" \
133 "Print a short usage statement to stderr and exit."
134 f_err "$optfmt" "--help" \
135 "Print this message to stderr and exit."
136 f_err "$optfmt" "-i" \
137 "Ignore unknown variables."
138 f_err "$optfmt" "-j jail" \
139 "The jid or name of the jail to operate within (overrides"
141 "\`-R dir'; requires jexec(8))."
142 f_err "$optfmt" "-l" \
143 "List configuration files used at startup on stdout and exit."
144 f_err "$optfmt" "-L" \
145 "List all configuration files including rc.conf.d entries."
146 f_err "$optfmt" "-n" \
147 "Show only variable values, not their names."
148 f_err "$optfmt" "-N" \
149 "Show only variable names, not their values."
150 f_err "$optfmt" "-q" \
151 "Quiet. Disable verbose and hide certain errors."
152 f_err "$optfmt" "-s name" \
153 "Process additional \`rc.conf.d' entries for service name."
155 "Ignored if \`-f file' is given."
156 f_err "$optfmt" "-R dir" \
157 "Operate within the root directory \`dir' rather than \`/'."
158 f_err "$optfmt" "-v" \
159 "Verbose. Print the pathname of the specific rc.conf(5)"
161 "file where the directive was found."
162 f_err "$optfmt" "--version" \
163 "Print version information to stdout and exit."
164 f_err "$optfmt" "-x" \
165 "Remove variable(s) from specified file(s)."
168 f_err "ENVIRONMENT:\n"
169 f_err "$envfmt" "RC_CONFS" \
170 "Override default rc_conf_files (even if set to NULL)."
171 f_err "$envfmt" "RC_DEFAULTS" \
172 "Location of \`/etc/defaults/rc.conf' file."
179 # Dump dependencies such as language-file variables and include files to stdout
180 # to be piped-into sh(1) running via jexec(8)/chroot(8). As a security measure,
181 # this prevents existing language files and library files from being loaded in
182 # the jail. This also relaxes the requirement to have these files in every jail
183 # before sysrc can be used on said jail.
188 # Indicate that we are jailed
190 echo export _SYSRC_JAILED=1
193 # Print i18n language variables (their current values are sanitized
194 # and re-printed for interpretation so that the i18n language files
195 # do not need to exist within the jail).
199 msg_cannot_create_permission_denied \
200 msg_permission_denied \
201 msg_previous_syntax_errors \
203 val=$( eval echo \"\$$var\" |
204 awk '{ gsub(/'\''/, "'\''\\'\'\''"); print }' )
209 # Print include dependencies
211 echo DEBUG_SELF_INITIALIZE=
212 cat $BSDCFG_SHARE/common.subr
213 cat $BSDCFG_SHARE/sysrc.subr
216 # escape $string [$var_to_set]
218 # Escape $string contents so that the contents can be properly encapsulated in
219 # single-quotes (making for safe evaluation).
221 # NB: See `bsdconfig includes -dF escape' for relevant information/discussion.
222 # NB: Abridged version of `f_shell_escape()' from bsdconfig(8) `strings.subr'.
226 local __start="$1" __var_to_set="$2" __string=
227 while [ "$__start" ]; do
228 case "$__start" in *\'*)
229 __string="$__string${__start%%\'*}'\\''"
230 __start="${__start#*\'}" continue
234 __string="$__string$__start"
235 if [ "$__var_to_set" ]; then
236 setvar "$__var_to_set" "$__string"
242 ############################################################ MAIN SOURCE
245 # Perform sanity checks
247 [ $# -gt 0 ] || usage # NOTREACHED
250 # Check for `--help' and `--version' command-line option
255 --help) help ;; # NOTREACHED
256 --version) # see GLOBALS
257 echo "$SYSRC_VERSION"
264 # Process command-line flags
266 while getopts aAcdDeEf:Fhij:lLnNqR:s:vxX flag; do
268 a) SHOW_ALL=${SHOW_ALL:-1} ;;
272 D) DEFAULT=1 RC_CONFS= ;;
274 E) EXISTING_ONLY=1 ;;
275 f) DEFAULT= RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG" ;;
277 h) usage ;; # NOTREACHED
278 i) IGNORE_UNKNOWNS=1 ;;
280 die "%s: Missing or null argument to \`-j' flag" "$pgm"
283 L) LIST_SERVICE_CONFS=1 ;;
286 q) QUIET=1 VERBOSE= ;;
288 die "%s: Missing or null argument to \`-R' flag" "$pgm"
291 die "%s: Missing or null argument to \`-s' flag" "$pgm"
293 v) VERBOSE=1 QUIET= ;;
294 x) DELETE=${DELETE:-1} ;;
296 \?) usage ;; # NOTREACHED
299 shift $(( $OPTIND - 1 ))
304 if [ "$LIST_SERVICE_CONFS" ]; then
308 # List rc_conf_files if no service names given
311 [ $# -eq 0 ] && files=$( f_sysrc_get rc_conf_files )
312 for file in $files; do
313 if [ "$EXISTING_ONLY" ]; then
314 [ -e "$file" -a ! -d "$file" ] || continue
317 "$file"|*" $file"|"$file "*|*" $file "*) continue ;;
322 if [ $# -eq 0 ]; then
323 if [ "$VERBOSE" ]; then
324 echo rc_conf_files: $list
325 elif [ "$SHOW_EQUALS" ]; then
326 echo "rc_conf_files=\"$list\""
331 # List rc.conf.d entries
334 for service in ${*:-$( service -l )}; do
336 f_sysrc_service_configs $service files || retval=$? continue
337 for file in $files; do
338 if [ "$EXISTING_ONLY" ]; then
339 [ -e "$file" -a ! -d "$file" ] || continue
341 if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then
343 "$file"|*" $file"|"$file "*|*" $file "*)
350 if [ $# -gt 0 ]; then
351 [ "$slist" ] || retval=$?
353 if [ "$VERBOSE" ]; then
354 [ "$slist" ] && echo "$service: $slist"
356 elif [ "$SHOW_EQUALS" ]; then
357 [ "$slist" ] && echo "$service=\"$slist\""
360 list="$list${slist:+ }$slist"
362 if [ ! "$VERBOSE" -a ! "$SHOW_EQUALS" ]; then
363 if [ $# -eq 0 -o ! "$QUIET" ]; then
365 [ "$list" ] && echo $list
376 # NB: shell expansion syntax removed first
377 name="${name%%:[+=-]*}"
378 name="${name%%[%#+=-]*}"
379 [ "$name" = "${name#*[!$VALID_VARNAME_CHARS]}" ] || die \
380 "%s: %s: name contains characters not allowed in shell" \
385 # Process `-s name' argument
387 if [ "$SERVICE" -a ! "${RC_CONFS+set}" ]; then
388 if f_sysrc_service_configs "$SERVICE" RC_CONFS; then
389 rc_conf_files=$( f_sysrc_get rc_conf_files )
390 RC_CONFS="$rc_conf_files${RC_CONFS:+ }$RC_CONFS"
398 # Process `-E' option flag
400 if [ "$EXISTING_ONLY" ]; then
402 # To get f_sysrc_*() to ignore missing rc_conf_files, we have to use
403 # RC_CONFS to override the unpreened value. If RC_CONFS already has a
404 # value (`-D', `-f file', `-s name', or inherited from parent), use it.
405 # Otherwise, include filtered contents of rc_conf_files.
408 if [ "${RC_CONFS+set}" ]; then
411 set -- $( f_sysrc_get rc_conf_files )
413 while [ $# -gt 0 ]; do
414 [ -f "$1" ] && echo -n " $1"
418 RC_CONFS="${RC_CONFS# }"
422 # Process `-l' option flag
424 if [ "$LIST_CONFS" ]; then
425 [ $# -eq 0 ] || usage
426 if [ "$DEFAULT" ]; then
428 elif [ "${RC_CONFS+set}" ]; then
431 f_sysrc_get rc_conf_files
437 # [More] Sanity checks (e.g., "sysrc --")
439 [ $# -eq 0 -a ! "$SHOW_ALL" ] && usage # NOTREACHED
442 # Taint-check all rc.conf(5) files
444 errmsg="$pgm: Exiting due to previous syntax errors"
445 if [ "${RC_CONFS+set}" ]; then
446 ( for i in $RC_CONFS; do
447 [ -e "$i" ] || continue
448 /bin/sh -n "$i" || exit $FAILURE
453 /bin/sh -n "$RC_DEFAULTS" || die "$errmsg"
455 for i in $rc_conf_files; do
456 [ -e "$i" ] || continue
457 /bin/sh -n "$i" || exit $FAILURE
464 # Process `-x' (and secret `-X') command-line options
466 errmsg="$pgm: \`-x' option incompatible with \`-a'/\`-A' options"
467 errmsg="$errmsg (use \`-X' to override)"
468 if [ "$DELETE" -a "$SHOW_ALL" ]; then
469 [ "$DELETE" = "2" ] || die "$errmsg"
473 # Pre-flight for `-c' command-line option
475 [ "$CHECK_ONLY" -a "$SHOW_ALL" ] &&
476 die "$pgm: \`-c' option incompatible with \`-a'/\`-A' options"
479 # Process `-e', `-n', and `-N' command-line options
482 [ "$SHOW_FILE" ] && SHOW_EQUALS=
483 [ "$SHOW_NAME" ] || SHOW_EQUALS=
484 [ "$VERBOSE" = "0" ] && VERBOSE=
485 if [ ! "$SHOW_VALUE" ]; then
489 [ "$SHOW_EQUALS" ] && SEP='="'
492 # Process `-j jail' and `-R dir' command-line options
494 if [ "$JAIL" -o "$ROOTDIR" ]; then
496 # Reconstruct the arguments that we want to carry-over
501 $( [ "$DELETE" = "1" ] && echo \ -x )
502 $( [ "$DELETE" = "2" ] && echo \ -X )
503 $( [ "$SHOW_ALL" = "1" ] && echo \ -a )
504 $( [ "$SHOW_ALL" = "2" ] && echo \ -A )
509 ${LIST_SERVICE_CONFS:+-L}
512 ${IGNORE_UNKNOWNS:+-i}
513 $( [ "$SHOW_NAME" ] || echo \ -n )
514 $( [ "$SHOW_VALUE" ] || echo \ -N )
515 $( [ "$SHOW_FILE" ] && echo \ -F )
517 if [ "$SERVICE" ]; then
518 escape "$SERVICE" _SERVICE
519 args="$args -s '$_SERVICE'"
522 if [ "${RC_CONFS+set}" ]; then
523 escape "$RC_CONFS" _RC_CONFS
524 args="$args -f '$_RC_CONFS'"
533 # If both are supplied, `-j jail' supercedes `-R dir'
537 # Re-execute ourselves with sh(1) via jexec(8)
542 ) | env - RC_DEFAULTS="$RC_DEFAULTS" \
543 /usr/sbin/jexec "$JAIL" /bin/sh
545 elif [ "$ROOTDIR" ]; then
547 # Make sure that the root directory specified is not to any
550 # NOTE: To maintain backward compatibility with older jails on
551 # older systems, we will not perform this check if either the
552 # jls(1) or jexec(8) utilities are missing.
554 if f_have jexec && f_have jls; then
555 jid=$( jls jid path |
556 while read JID JROOT; do
557 [ "$JROOT" = "$ROOTDIR" ] || continue
563 # If multiple running jails match the specified root
564 # directory, exit with error.
566 if [ "$jid" -a "${jid%[$IFS]*}" != "$jid" ]; then
567 die "%s: %s: %s" "$pgm" "$ROOTDIR" \
568 "$( echo "Multiple jails claim this" \
569 "directory as their root." \
570 "(use \`-j jail' instead)" )"
574 # If only a single running jail matches the specified
575 # root directory, implicitly use `-j jail'.
579 # Re-execute outselves with sh(1) via jexec(8)
584 ) | env - RC_DEFAULTS="$RC_DEFAULTS" \
585 /usr/sbin/jexec "$jid" /bin/sh
589 # Otherwise, fall through and allow chroot(8)
593 # Re-execute ourselves with sh(1) via chroot(8)
598 ) | env - RC_DEFAULTS="$RC_DEFAULTS" \
599 /usr/sbin/chroot "$ROOTDIR" /bin/sh
605 # Process `-a' or `-A' command-line options
607 if [ "$SHOW_ALL" ]; then
609 # Get a list of variables that are currently set in the rc.conf(5)
610 # files (including `/etc/defaults/rc.conf') by performing a call to
611 # source_rc_confs() in a clean environment.
613 ( # Operate in a sub-shell to protect the parent environment
615 # Set which variables we want to preserve in the environment.
616 # Append the pipe-character (|) to the list of internal field
617 # separation (IFS) characters, allowing us to use the below
618 # list both as an extended grep (-E) pattern and argument list
619 # (required to first get f_clean_env() to preserve these in the
620 # environment and then later to prune them from the list of
621 # variables produced by set(1)).
624 EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP"
625 EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME|DEFAULT"
626 EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS|SERVICE"
627 EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY|EXISTING_ONLY"
628 EXCEPT="$EXCEPT|LIST_CONFS|LIST_SERVICE_CONFS"
629 EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk"
632 # Clean the environment (except for our required variables)
633 # and then source the required files.
635 f_clean_env --except $EXCEPT
636 if [ -f "$RC_DEFAULTS" -a -r "$RC_DEFAULTS" ]; then
640 # If passed `-a' (rather than `-A'), re-purge the
641 # environment, removing the rc.conf(5) defaults.
643 [ "$SHOW_ALL" = "1" ] &&
644 f_clean_env --except rc_conf_files $EXCEPT
647 # If `-f file' was passed, set $rc_conf_files to an
648 # explicit value, modifying the default behavior of
651 if [ "${RC_CONFS+set}" ]; then
652 [ "$SHOW_ALL" = "1" -a "$SERVICE" -a \
653 ! "$DEFAULT" ] || rc_conf_files=
654 rc_conf_files="$rc_conf_files $RC_CONFS"
655 rc_conf_files="${rc_conf_files# }"
656 rc_conf_files="${rc_conf_files% }"
662 # If passed `-a' (rather than `-A'), remove
663 # `rc_conf_files' unless it was defined somewhere
664 # other than rc.conf(5) defaults.
666 [ "$SHOW_ALL" = "1" -a \
667 "$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \
668 ] && unset rc_conf_files
672 awk -F= '/^[[:alpha:]_][[:alnum:]_]*=/ {print $1}' |
673 grep -Ev "^($EXCEPT)$"
676 # If enabled, describe rather than expand value
678 if [ "$DESCRIBE" ]; then
679 echo "$NAME: $( f_sysrc_desc "$NAME" )"
684 # If `-F' is passed, find it and move on
686 if [ "$SHOW_FILE" ]; then
687 [ "$SHOW_NAME" ] && echo -n "$NAME: "
693 # If `-X' is passed, delete the variables
695 if [ "$DELETE" = "2" ]; then
696 f_sysrc_delete "$NAME"
701 echo -n "$( f_sysrc_find "$NAME" ): "
704 # If `-N' is passed, simplify the output
706 if [ ! "$SHOW_VALUE" ]; then
711 echo "${SHOW_NAME:+$NAME$SEP}$(
712 f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}"
718 # Ignore the remainder of positional arguments.
724 # Process command-line arguments
727 while [ $# -gt 0 ]; do
731 *+) mode=APPEND NAME="${NAME%+}" ;;
732 *-) mode=REMOVE NAME="${NAME%-}" ;;
737 echo "$NAME: $( f_sysrc_desc "$NAME" )"
742 # Like sysctl(8), if both `-d' AND "name=value" is passed,
743 # first describe (done above), then attempt to set
746 # If verbose, prefix line with where the directive lives
747 if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then
748 file=$( f_sysrc_find "$NAME" )
749 [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] &&
750 file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' )
751 if [ "$SHOW_EQUALS" ]; then
759 # If `-x' or `-X' is passed, delete the variable and ignore the
760 # desire to set some value
762 if [ "$DELETE" ]; then
763 f_sysrc_delete "$NAME" || status=$FAILURE
769 # If `-c' is passed, simply compare and move on
771 if [ "$CHECK_ONLY" ]; then
772 if ! IGNORED=$( f_sysrc_get "$NAME?" ); then
775 echo "$NAME: not currently set"
779 value=$( f_sysrc_get "$NAME" )
780 if [ "$value" != "${1#*=}" ]; then
782 if [ "$VERBOSE" ]; then
783 echo -n "$( f_sysrc_find "$NAME" ): "
784 echo -n "$NAME: would change from "
785 echo "\`$value' to \`${1#*=}'"
787 elif [ "$VERBOSE" ]; then
788 echo -n "$( f_sysrc_find "$NAME" ): "
789 echo "$NAME: already set to \`$value'"
796 # Determine both `before' value and appropriate `new' value
800 before=$( f_sysrc_get "$NAME" )
802 delim="${add%"${add#?}"}" # first character
805 ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;;
813 [ "$b" = "$a" ] && skip=1 break
815 [ "$skip" ] || new="$new$delim$a"
817 new="${new#"$delim"}" IFS="$oldIFS"
818 unset add delim oldIFS a skip b
819 [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" )
822 before=$( f_sysrc_get "$NAME" )
824 delim="${remove%"${remove#?}"}" # first character
827 ""|[$IFS]|[a-zA-Z0-9./]) delim=" " ;;
835 [ "$r" = "$b" ] && add= break
837 [ "$add" ] && new="$new$delim$b"
839 new="${new#"$delim"}" IFS="$oldIFS"
840 unset remove delim oldIFS b add r
841 [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" )
844 if [ "$SHOW_FILE" ]; then
845 before=$( f_sysrc_find "$NAME" )
847 before=$( f_sysrc_get "$NAME" )
853 # If `-N' is passed, simplify the output
855 if [ ! "$SHOW_VALUE" ]; then
857 f_sysrc_set "$NAME" "$new" || status=$FAILURE
859 if f_sysrc_set "$NAME" "$new"; then
860 if [ "$SHOW_FILE" ]; then
861 after=$( f_sysrc_find "$NAME" )
863 after=$( f_sysrc_get "$NAME" )
865 echo -n "${SHOW_NAME:+$NAME$SEP}"
866 echo -n "$before${SHOW_EQUALS:+\" #}"
867 echo -n " -> ${SHOW_EQUALS:+\"}$after"
868 echo "${SHOW_EQUALS:+\"}"
875 if ! IGNORED=$( f_sysrc_get "$NAME?" ); then
876 [ "$IGNORE_UNKNOWNS" -o "$QUIET" ] ||
877 f_err "%s: unknown variable '%s'\n" \
884 # The above check told us what we needed for `-c'
885 if [ "$CHECK_ONLY" ]; then
891 # Like sysctl(8), when `-d' is passed, desribe it
892 # (already done above) rather than expanding it
895 if [ "$DESCRIBE" ]; then
901 # If `-x' or `-X' is passed, delete the variable
903 if [ "$DELETE" ]; then
904 f_sysrc_delete "$NAME" || status=$FAILURE
910 # If `-F' is passed, find it and move on
912 if [ "$SHOW_FILE" ]; then
913 [ "$SHOW_NAME" ] && echo -n "$NAME: "
919 if [ "$VERBOSE" ]; then
920 if [ "$SHOW_EQUALS" ]; then
921 echo -n ": $( f_sysrc_find "$NAME" ); "
923 echo -n "$( f_sysrc_find "$NAME" ): "
928 # If `-N' is passed, simplify the output
930 if [ ! "$SHOW_VALUE" ]; then
933 echo "${SHOW_NAME:+$NAME$SEP}$(
934 f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}"
940 exit $status # $SUCCESS unless error occurred with either `-c' or `-x'
942 ################################################################################
944 ################################################################################