diff options
author | dteske <dteske@FreeBSD.org> | 2014-09-02 22:59:40 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2014-09-02 22:59:40 +0000 |
commit | 80421e1e60827e44bae8839b6ff66a29a4feb623 (patch) | |
tree | d3726f1f24e545b18e95060315dd39d446c29835 /usr.sbin | |
parent | dc78f18afeff8337d1395cf495be275436c92740 (diff) | |
download | FreeBSD-src-80421e1e60827e44bae8839b6ff66a29a4feb623.zip FreeBSD-src-80421e1e60827e44bae8839b6ff66a29a4feb623.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bsdconfig/share/dialog.subr | 4 |
1 files changed, 2 insertions, 2 deletions
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 |