From 0e91bfff1be1c7b58673738961cf8c144d2245c2 Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Mon, 17 Nov 2014 13:52:44 +0000 Subject: [PATCH] "reload" should fail if the service is not running in the first place. ok robert@ sthen@ --- src/etc/rc.d/rc.subr | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index 583d9ce9..0c9c7dc2 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.89 2014/08/30 20:33:27 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.90 2014/11/17 13:52:44 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -226,9 +226,8 @@ rc_cmd() { _rc_exit ok ;; reload) - _rc_do rc_check || exit 0 echo $_n "${INRC:+ }${_name}" - _rc_do rc_reload || _rc_exit failed + _rc_do rc_check && _rc_do rc_reload || _rc_exit failed _rc_do _rc_wait reload || _rc_exit failed _rc_exit ok ;;