summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysrc
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2015-11-02 22:56:10 +0000
committerdteske <dteske@FreeBSD.org>2015-11-02 22:56:10 +0000
commit2f6ac8211dcc70783339852db2060c774b5a4923 (patch)
tree04bcb2429ee93a89b8aee6001d6ec0b5c6c3e6df /usr.sbin/sysrc
parent9c72dfc6369931912573fbef9f4472c4a759030d (diff)
downloadFreeBSD-src-2f6ac8211dcc70783339852db2060c774b5a4923.zip
FreeBSD-src-2f6ac8211dcc70783339852db2060c774b5a4923.tar.gz
MFC r287413: Minor code cleanups (no functional changes).
Diffstat (limited to 'usr.sbin/sysrc')
-rw-r--r--usr.sbin/sysrc/sysrc26
1 files changed, 12 insertions, 14 deletions
diff --git a/usr.sbin/sysrc/sysrc b/usr.sbin/sysrc/sysrc
index 7618514..2a24551 100644
--- a/usr.sbin/sysrc/sysrc
+++ b/usr.sbin/sysrc/sysrc
@@ -257,14 +257,14 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag; do
F) SHOW_FILE=1 ;;
h) usage ;; # NOTREACHED
i) IGNORE_UNKNOWNS=1 ;;
- j) [ "$OPTARG" ] || die \
- "%s: Missing or null argument to \`-j' flag" "$pgm"
+ j) [ "$OPTARG" ] ||
+ die "%s: Missing or null argument to \`-j' flag" "$pgm"
JAIL="$OPTARG" ;;
n) SHOW_NAME= ;;
N) SHOW_VALUE= ;;
q) QUIET=1 VERBOSE= ;;
- R) [ "$OPTARG" ] || die \
- "%s: Missing or null argument to \`-R' flag" "$pgm"
+ R) [ "$OPTARG" ] ||
+ die "%s: Missing or null argument to \`-R' flag" "$pgm"
ROOTDIR="$OPTARG" ;;
v) VERBOSE=1 QUIET= ;;
x) DELETE=${DELETE:-1} ;;
@@ -384,13 +384,12 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then
# jls(1) or jexec(8) utilities are missing.
#
if f_have jexec && f_have jls; then
- jid="`jls jid path | \
- (
+ jid=$( jls jid path |
while read JID JROOT; do
[ "$JROOT" = "$ROOTDIR" ] || continue
echo $JID
done
- )`"
+ )
#
# If multiple running jails match the specified root
@@ -472,8 +471,8 @@ if [ "$SHOW_ALL" ]; then
# If passed `-a' (rather than `-A'), re-purge the
# environment, removing the rc.conf(5) defaults.
#
- [ "$SHOW_ALL" = "1" ] \
- && f_clean_env --except rc_conf_files $EXCEPT
+ [ "$SHOW_ALL" = "1" ] &&
+ f_clean_env --except rc_conf_files $EXCEPT
#
# If `-f file' was passed, set $rc_conf_files to an
@@ -491,8 +490,7 @@ if [ "$SHOW_ALL" ]; then
#
[ "$SHOW_ALL" = "1" -a \
"$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \
- ] \
- && unset rc_conf_files
+ ] && unset rc_conf_files
fi
for NAME in $( set |
@@ -524,7 +522,7 @@ if [ "$SHOW_ALL" ]; then
continue
fi
- [ "$VERBOSE" ] && \
+ [ "$VERBOSE" ] &&
echo -n "$( f_sysrc_find "$NAME" ): "
#
@@ -560,7 +558,7 @@ while [ $# -gt 0 ]; do
*) mode=ASSIGN
esac
- [ "$DESCRIBE" ] && \
+ [ "$DESCRIBE" ] &&
echo "$NAME: $( f_sysrc_desc "$NAME" )"
case "$1" in
@@ -573,7 +571,7 @@ while [ $# -gt 0 ]; do
# If verbose, prefix line with where the directive lives
if [ "$VERBOSE" -a ! "$CHECK_ONLY" ]; then
file=$( f_sysrc_find "$NAME" )
- [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \
+ [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] &&
file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' )
if [ "$SHOW_EQUALS" ]; then
echo -n ": $file; "
OpenPOWER on IntegriCloud