Date: Wed, 2 Sep 2015 21:53:49 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287413 - head/usr.sbin/sysrc Message-ID: <201509022153.t82LrnOJ049645@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Wed Sep 2 21:53:48 2015 New Revision: 287413 URL: https://svnweb.freebsd.org/changeset/base/287413 Log: Minor code cleanups (no functional changes). MFC after: 3 days X-MFC-to: stable/10 Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Wed Sep 2 21:13:06 2015 (r287412) +++ head/usr.sbin/sysrc/sysrc Wed Sep 2 21:53:48 2015 (r287413) @@ -257,14 +257,14 @@ while getopts aAcdDef:Fhij:nNqR:vxX flag 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; "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509022153.t82LrnOJ049645>