Browse Source

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@
OPENBSD_5_0
ajacoutot 13 years ago
parent
commit
3ad0c3f168
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/etc/rc.d/rc.subr

+ 3
- 2
src/etc/rc.d/rc.subr View File

@ -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)


Loading…
Cancel
Save