svn commit: r269352 - head/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Thu Jul 31 22:05:18 UTC 2014


Author: dteske
Date: Thu Jul 31 22:05:18 2014
New Revision: 269352
URL: http://svnweb.freebsd.org/changeset/base/269352

Log:
  Fix a syntax error when running under bash(1) for portability.

Modified:
  head/usr.sbin/bsdconfig/share/dialog.subr

Modified: head/usr.sbin/bsdconfig/share/dialog.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/dialog.subr	Thu Jul 31 22:00:36 2014	(r269351)
+++ head/usr.sbin/bsdconfig/share/dialog.subr	Thu Jul 31 22:05:18 2014	(r269352)
@@ -2099,9 +2099,13 @@ f_dialog_init()
 	#
 	# Process stored command-line arguments
 	#
+	# NB: Using backticks instead of $(...) for portability since Linux
+	#     bash(1) balks at the right parentheses encountered in the case-
+	#     statement (incorrectly interpreting it as the close of $(...)).
+	#
 	f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \
 	          "$ARGV" "$GETOPTS_STDARGS"
-	SECURE=$( set -- $ARGV
+	SECURE=`set -- $ARGV
 		while getopts \
 			"$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \
 		flag > /dev/null; do
@@ -2109,8 +2113,8 @@ f_dialog_init()
 			S) echo 1 ;;
 			esac
 		done
-	)
-	USE_XDIALOG=$( set -- $ARGV
+	` # END-BACKTICK
+	USE_XDIALOG=`set -- $ARGV
 		while getopts \
 			"$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \
 		flag > /dev/null; do
@@ -2118,7 +2122,7 @@ f_dialog_init()
 			S|X) echo 1 ;;
 			esac
 		done
-	)
+	` # END-BACKTICK
 	f_dprintf "f_dialog_init: SECURE=[%s] USE_XDIALOG=[%s]" \
 	          "$SECURE" "$USE_XDIALOG"
 


More information about the svn-src-all mailing list