service(8): Reset OPTIND properly now that we're parsing args twice

r328032 introduced a second round of argument parsing to proxy the request
through to a jail as needed, but failed to reset OPTIND before getting to
the second round of parsing to allow other flags to be set.

Reported by:	Oleg Ginzburg <olevole olevole ru>
This commit is contained in:
Kyle Evans 2018-01-16 20:14:31 +00:00
parent 6accaf4a90
commit a6f9024f20
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328060

View File

@ -79,6 +79,7 @@ if [ -n "$JAIL" ]; then
exit $?
fi
OPTIND=1
while getopts ${accepted_argstr} COMMAND_LINE_ARGUMENT ; do
case "${COMMAND_LINE_ARGUMENT}" in
e) ENABLED=eopt ;;