diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2011-07-07 17:37:31 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2011-07-07 17:37:31 +0000 |
commit | 323960b486363ceabc2690ee5011f82978a752fc (patch) | |
tree | 22d23bee53165868141432d06a0693eb04523b2f /etc/rc.d | |
parent | fd22233484b49324cd98ff0392a7398180f13647 (diff) |
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@
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/rc.subr | 5 |
1 files changed, 3 insertions, 2 deletions
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) |