[Linux-ha-dev] [patch] init: add should-start/stop $remote_fs to init script

Simon Horman horms at verge.net.au
Sun Jan 6 20:04:25 MST 2008


On Sun, Jan 06, 2008 at 11:22:22PM +0100, Petter Reinholdtsen wrote:

[snip]

> I notice the package depend on openhpid.  If heartbeat need openhpid
> to start before it in the boot, it should list it in required-start or
> should-start, depending on how hard the dependency should be.  And the
> same in required-stop or should-stop, if heartbeat need to stop before
> openhpid during shutdown.  I do not know the package enough to say.

Hi Petter,

I've looked into this breifly and I believe that the short answer is yes.

It seems that in Debian openhpid is a recomemdation of libopenhpi2 which
is a dependancy of heartbeat, and thus using should-start/should-stop in
the init script would be the most appropriate option. This should also
nicely cover other distributions with a loose package dependancy on
openhpid (the script in question is generic IIRC).

I notice that the openhpid init script in Debian doesn't have any LSB
tags, and in paricular no "Provides: ", so I have just used openhpid as
the dependancy, rather than $openhpid. Is that correct?

Also, should-stop ntp appears to be missing. I'd appreciate your
thoughts o whether it should be added.

Cc: Petter Reinholdtsen <pere at hungry.com>
Signed-off-by: Simon Horman <horms at verge.net.au>

Index: heartbeat/heartbeat/init.d/heartbeat.in
===================================================================
--- heartbeat.orig/heartbeat/init.d/heartbeat.in	2008-01-07 11:53:23.000000000 +0900
+++ heartbeat/heartbeat/init.d/heartbeat.in	2008-01-07 11:54:17.000000000 +0900
@@ -37,8 +37,9 @@
 # Short-Description: High-availability services.
 # Provides: heartbeat HA
 # Required-Start: $remote_fs $network $time $syslog
-# Should-Start: ntp
+# Should-Start: ntp openhpid
 # Required-Stop: $remote_fs $network $time $syslog
+# Should-stop: openhpid
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
 ### END INIT INFO


More information about the Linux-HA-Dev mailing list