[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] Network and Ip Failover
From:       Alan Robertson <alanr () suse ! com>
Date:       2001-02-03 2:54:33
[Download RAW message or body]

Juan Pedro Paredes Caballero wrote:
> 
> A bad impelmetation of ethernet failover but work's for me for test.
> I have a beat a the same interface to data services an when it comes down
> 
> -----8<------
> #!/bin/bash
> GW=`route|grep default|awk '{print $2}'`
> 
> alive(){
>         ping -c 1 -v $1|grep received|awk '{print $4}'
> }
> 
> if [ "`alive $GW`" != "1" ]
> then
>         echo "I'm in doub, but data service interface apears to be down!"
>         sleep 10
>         if [ "`alive $GW`" != "1" ]
>         then
>                 echo "Aieee! Data service interface is Down!"
>                 /etc/init.d/heartbeat stop #for Debian
>                 /etc/rc.d/init.d/heartbeat stop #for RH like
>         fi
> fi

If you want to shut down heartbeat in a distribution-independent way, you
can just do a /usr/lib/heartbeat/heartbeat -k.

	-- Alan Robertson
	   alanr@suse.com



_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.tummy.com
http://lists.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic