diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index f5fb6d09600..23cb8d6b6b1 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.166 2025/08/16 10:23:45 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.167 2025/12/06 11:04:45 kn Exp $ # # Copyright (c) 2010, 2011, 2014-2022 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -347,6 +347,7 @@ while getopts "dfq" c; do esac done shift $((OPTIND-1)) +OPTIND=1 [[ -n ${_RC_DEBUG} && -n ${_RC_QUIET} ]] && _rc_usage _RC_RUNDIR=/var/run/rc.d diff --git a/etc/rc.d/spamlogd b/etc/rc.d/spamlogd index ddc360afe4d..15b972183e5 100644 --- a/etc/rc.d/spamlogd +++ b/etc/rc.d/spamlogd @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: spamlogd,v 1.8 2025/11/29 10:44:46 kn Exp $ +# $OpenBSD: spamlogd,v 1.9 2025/12/06 11:04:45 kn Exp $ daemon="/usr/libexec/spamlogd" @@ -9,7 +9,7 @@ daemon="/usr/libexec/spamlogd" rc_reload=NO rc_pre() { - local _opt pflog=pflog0 OPTIND=1 + local _opt pflog=pflog0 while getopts :l: _opt $daemon_flags; do [[ $_opt == l ]] && pflog=$OPTARG diff --git a/etc/rc.d/unbound b/etc/rc.d/unbound index 8efea3dbb7f..e3abb8f28ba 100644 --- a/etc/rc.d/unbound +++ b/etc/rc.d/unbound @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: unbound,v 1.11 2025/11/29 10:44:46 kn Exp $ +# $OpenBSD: unbound,v 1.12 2025/12/06 11:04:45 kn Exp $ daemon="/usr/sbin/unbound" daemon_flags="-c /var/unbound/etc/unbound.conf" @@ -8,7 +8,7 @@ daemon_flags="-c /var/unbound/etc/unbound.conf" . /etc/rc.d/rc.subr rc_pre() { - local _anchor _config _opt OPTIND=1 + local _anchor _config _opt while getopts :c: _opt $daemon_flags; do [[ $_opt == c ]] && _config=$OPTARG