summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysrc
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2015-11-02 22:30:55 +0000
committerdteske <dteske@FreeBSD.org>2015-11-02 22:30:55 +0000
commit69dc80f482ab7938f1248d21e1ab7629faedae1e (patch)
tree3f3b0ded5fdf8b5356e395ffff9ea50047291809 /usr.sbin/sysrc
parent2c0c536f59e792f1483157064b5ffb5b5940e44e (diff)
downloadFreeBSD-src-69dc80f482ab7938f1248d21e1ab7629faedae1e.zip
FreeBSD-src-69dc80f482ab7938f1248d21e1ab7629faedae1e.tar.gz
MFC r287378:
Remove `SYSRC_' prefix from $SYSRC_VERBOSE (prefix unnecessary since this is a non-inheritable attribute; was previously).
Diffstat (limited to 'usr.sbin/sysrc')
-rw-r--r--usr.sbin/sysrc/sysrc24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/sysrc/sysrc b/usr.sbin/sysrc/sysrc
index 67b5e14..ecfa863 100644
--- a/usr.sbin/sysrc/sysrc
+++ b/usr.sbin/sysrc/sysrc
@@ -57,7 +57,7 @@ SHOW_EQUALS=
SHOW_FILE=
SHOW_NAME=1
SHOW_VALUE=1
-SYSRC_VERBOSE=
+VERBOSE=
############################################################ FUNCTIONS
@@ -240,11 +240,11 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag; do
JAIL="$OPTARG";;
n) SHOW_NAME=;;
N) SHOW_VALUE=;;
- q) QUIET=1 SYSRC_VERBOSE=;;
+ q) QUIET=1 VERBOSE=;;
R) [ "$OPTARG" ] || die \
"%s: Missing or null argument to \`-R' flag" "$pgm"
ROOTDIR="$OPTARG";;
- v) SYSRC_VERBOSE=1 QUIET=;;
+ v) VERBOSE=1 QUIET=;;
x) DELETE=${DELETE:-1};;
X) DELETE=2;;
\?) usage;;
@@ -300,7 +300,7 @@ fi
SEP=': '
[ "$SHOW_FILE" ] && SHOW_EQUALS=
[ "$SHOW_NAME" ] || SHOW_EQUALS=
-[ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE=
+[ "$VERBOSE" = "0" ] && VERBOSE=
if [ ! "$SHOW_VALUE" ]; then
SHOW_NAME=1
SHOW_EQUALS=
@@ -315,7 +315,7 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then
# Reconstruct the arguments that we want to carry-over
#
args="
- ${SYSRC_VERBOSE:+-v}
+ ${VERBOSE:+-v}
${QUIET:+-q}
$( [ "$DELETE" = "1" ] && echo \ -x )
$( [ "$DELETE" = "2" ] && echo \ -X )
@@ -431,7 +431,7 @@ if [ "$SHOW_ALL" ]; then
IFS="$IFS|"
EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP"
EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME"
- EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS"
+ EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|VERBOSE|RC_CONFS"
EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY"
EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk"
@@ -499,7 +499,7 @@ if [ "$SHOW_ALL" ]; then
continue
fi
- [ "$SYSRC_VERBOSE" ] && \
+ [ "$VERBOSE" ] && \
echo -n "$( f_sysrc_find "$NAME" ): "
#
@@ -546,7 +546,7 @@ while [ $# -gt 0 ]; do
#
# If verbose, prefix line with where the directive lives
- if [ "$SYSRC_VERBOSE" -a ! "$CHECK_ONLY" ]; then
+ if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then
file=$( f_sysrc_find "$NAME" )
[ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \
file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' )
@@ -573,7 +573,7 @@ while [ $# -gt 0 ]; do
if [ "$CHECK_ONLY" ]; then
if ! IGNORED=$( f_sysrc_get "$NAME?" ); then
status=$FAILURE
- [ "$SYSRC_VERBOSE" ] &&
+ [ "$VERBOSE" ] &&
echo "$NAME: not currently set"
shift 1
continue
@@ -581,12 +581,12 @@ while [ $# -gt 0 ]; do
value=$( f_sysrc_get "$NAME" )
if [ "$value" != "${1#*=}" ]; then
status=$FAILURE
- if [ "$SYSRC_VERBOSE" ]; then
+ if [ "$VERBOSE" ]; then
echo -n "$( f_sysrc_find "$NAME" ): "
echo -n "$NAME: would change from "
echo "\`$value' to \`${1#*=}'"
fi
- elif [ "$SYSRC_VERBOSE" ]; then
+ elif [ "$VERBOSE" ]; then
echo -n "$( f_sysrc_find "$NAME" ): "
echo "$NAME: already set to \`$value'"
fi
@@ -715,7 +715,7 @@ while [ $# -gt 0 ]; do
continue
fi
- if [ "$SYSRC_VERBOSE" ]; then
+ if [ "$VERBOSE" ]; then
if [ "$SHOW_EQUALS" ]; then
echo -n ": $( f_sysrc_find "$NAME" ); "
else
OpenPOWER on IntegriCloud