From 12aaacbc19298c2084aa62579421f8771e651823 Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Sat, 22 Feb 2020 18:58:13 +0000 Subject: [PATCH] Do not run _rc_parse_conf of /var/run/rc.d/foobar on "start". This is needed in case a foobar fails to start but still returns 0. Changing its flags (in rc.conf.local) would then get ignored because of this cache (which is around to handle stop/check/reload on flags changes). claudio@ reported this issue when struggling with prometheus several weeks ago --- src/etc/rc.d/rc.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index f795476f..1c5bee17 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.132 2019/09/07 10:02:19 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.133 2020/02/22 18:58:13 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014-2017 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -201,7 +201,7 @@ rc_cmd() { [ -n "${_RC_DEBUG}" ] || _n="-n" - _rc_do _rc_parse_conf ${_RC_RUNFILE} + [[ ${1} == start ]] || _rc_do _rc_parse_conf ${_RC_RUNFILE} case "$1" in check)