From 80421e1e60827e44bae8839b6ff66a29a4feb623 Mon Sep 17 00:00:00 2001 From: dteske Date: Tue, 2 Sep 2014 22:59:40 +0000 Subject: Fix regression introduced by SVN r270954. Correct way to reset getopts is to set OPTIND to 1, not unset it (which causes an error). Thanks to: jilles --- usr.sbin/bsdconfig/share/dialog.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bsdconfig/share/dialog.subr b/usr.sbin/bsdconfig/share/dialog.subr index 780bfcd..db99a70 100644 --- a/usr.sbin/bsdconfig/share/dialog.subr +++ b/usr.sbin/bsdconfig/share/dialog.subr @@ -2116,7 +2116,7 @@ f_dialog_init() f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" SECURE=`set -- $ARGV - unset OPTIND + OPTIND=1 while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do @@ -2126,7 +2126,7 @@ f_dialog_init() done ` # END-BACKTICK USE_XDIALOG=`set -- $ARGV - unset OPTIND + OPTIND=1 while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do -- cgit v1.1