Correction. Obviously, that is not the command being used.
It's system("(/etc/init.d/heartbeat restart &)");
The command below was from an old version.
Thanks,
Nate
On Friday 24 February 2006 14:44, Nate Reed wrote:
> In our cluster, Heartbeat is running mon. I have a mon alert script that
> attempts to restart the cluster using /etc/init.d/heartbeat restart.
>
> Since mon's parent is Heartbeat, the current process gets killed before it
> can start a new Heartbeat process.
>
> Here is the command I'm using in Perl:
>
> system("(/etc/init.d/heartbeat stop &)");
>
> I was told opening it in a subshell (the part in ()'s) would create the
> process without the current process as the owner, and therefore the init
> script would run to completion.
>
> But it never gets to the "StartHA" command in the init script.
>
> Any ideas? Is there a way to pass off control to an independent process
> that won't get killed when Heartbeat shuts down?
>
> Here's the restart portion of /etc/init.d/heartbeat:
>
> restart)
> sleeptime=`ha_parameter deadtime`
> StopHA <-- Seems to die here
> Echo
> EchoNoNl Waiting to allow resource takeover to complete:
> sleep $sleeptime
> sleep 10 # allow resource takeover to complete (hopefully).
> echo_success
> Echo
> StartHA
> Echo
> ;;
>
> Nate
> _______________________________________________
> Linux-HA mailing list
> [EMAIL PROTECTED]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/