Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2012 23:45:56 +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: r241565 - head/usr.sbin/sysrc
Message-ID:  <201210142345.q9ENjuCN067287@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Sun Oct 14 23:45:56 2012
New Revision: 241565
URL: http://svn.freebsd.org/changeset/base/241565

Log:
  Mirror the changes made in SVN r240798:
  
  Replace "( : ${var?} )" syntax with better "[ ${var+set} ]" syntax.
  
  Reviewed by:	adrian (co-mentor)
  Approved by:	adrian (co-mentor)

Modified:
  head/usr.sbin/sysrc/sysrc

Modified: head/usr.sbin/sysrc/sysrc
==============================================================================
--- head/usr.sbin/sysrc/sysrc	Sun Oct 14 23:07:54 2012	(r241564)
+++ head/usr.sbin/sysrc/sysrc	Sun Oct 14 23:45:56 2012	(r241565)
@@ -251,7 +251,7 @@ shift $(( $OPTIND - 1 ))
 # Taint-check all rc.conf(5) files
 #
 errmsg="$pgm: Exiting due to previous syntax errors"
-if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then
+if [ "${RC_CONFS+set}" ]; then
 	( for i in $RC_CONFS; do
 	  	[ -e "$i" ] || continue
 	  	/bin/sh -n "$i" || exit $FAILURE
@@ -311,7 +311,7 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then
 		$( [ "$SHOW_VALUE" ] || echo \ -N )
 		$( [ "$SHOW_FILE"  ] && echo \ -F )
 	"
-	if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then
+	if [ "${RC_CONFS+set}" ]; then
 		args="$args -f '$RC_CONFS'"
 	fi
 	for arg in "$@"; do
@@ -437,8 +437,7 @@ if [ "$SHOW_ALL" ]; then
 			# explicit value, modifying the default behavior of
 			# source_rc_confs().
 			#
-			( : ${RC_CONFS?} ) > /dev/null 2>&1 &&
-				rc_conf_files="$RC_CONFS"
+			[ "${RC_CONFS+set}" ] && rc_conf_files="$RC_CONFS"
 
 			source_rc_confs
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210142345.q9ENjuCN067287>