From 323960b486363ceabc2690ee5011f82978a752fc Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Thu, 7 Jul 2011 17:37:31 +0000 Subject: Fix reload: * if we try to reload a non running daemon, just exit gracefully, like we do for 'stop' * add an rc_check call right after rc_reload to make sure the daemon is still around; until now we only checked the pkill(1) return code but that is not enough ok robert@ --- etc/rc.d/rc.subr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'etc/rc.d') diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 837d95809c9..eebad24084c 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.40 2011/07/06 18:55:36 robert Exp $ +# $OpenBSD: rc.subr,v 1.41 2011/07/07 17:37:30 ajacoutot Exp $ # Default functions and variables used by rc.d(8) scripts. @@ -100,8 +100,9 @@ rc_cmd() { rc_exit ok ;; reload) - rc_do rc_check || rc_exit failed + rc_do rc_check || exit 0 rc_do rc_reload || rc_exit failed + rc_do rc_check || rc_exit failed rc_exit ok ;; restart) -- cgit v1.2.3