summaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2020-02-22 18:58:14 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2020-02-22 18:58:14 +0000
commit47f9c945fd81dc04f1bb1cb1b55f41e0d4fff9a9 (patch)
treedef6d2302e3cb05f5468cf0d707d2228435ebd6e /etc/rc.d
parent0cd350dc3c55f60df655256b462abe08fe3677b0 (diff)
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
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/rc.subr4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
index f795476f2bd..1c5bee175de 100644
--- a/etc/rc.d/rc.subr
+++ b/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 <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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)