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

List:       linux-ha-dev
Subject:    [Linux-ha-dev] [Fwd: Linux-HA-Dev Subscribe Notification]
From:       Eric Dillmann <lists () AAcom ! fr>
Date:       2002-03-15 15:26:03
[Download RAW message or body]

*** Ce message a été vérifié par un anti-virus ***

[Attachment #3 (message/rfc822)]

This is a multi-part message in MIME format.
[Attachment #5 (multipart/alternative)]


>

this one is FREE of use (largely inspired from IPADDR), but RH-specific
:-(

his name is IF

>
> #!/bin/sh
> #
> # $Id$
> #
> # This script manages IP interfaces takeover
> #
> # usage: $0 if-name {start|stop|status}
> #
> # The "start" arg start the interface
> #
> # Surprisingly, the "stop" stop it
> #
> #
>
> LC_ALL=en; export LC_ALL # Make ifconfig work in France for David
> Jules :-)
>
> . /etc/ha.d/shellfuncs
>
> #
> # shutdown interface
> #
> ip_stop() {
>   /etc/sysconfig/network-scripts/ifdown $1
>   /sbin/ifconfig $1 inet 0.0.0.0 down
>   ha_log "IF $1 released"
> }
>
>
> #
> # startup interface
> #
> ip_start() {
>   /etc/sysconfig/network-scripts/ifup $1
>   ha_log "IF $1 started"
> }
>
> ip_status() {
>
>   . /etc/sysconfig/network-scripts/ifcfg-$1
>
>   if
>     /sbin/ifconfig $1 | fgrep "inet adr:$IPADDR " >/dev/null 2>&1
>   then
>     echo "running"
>   else
>     echo "stopped"
>   fi
> }
>
> #
> # start or stop interface
> #
> case $2 in
>   start) ip_start $1;;
>   stop)  ip_stop $1;;
>   status) ip_status $1;;
> esac
>
> // sample /etc/sysconfig/network-scripts/ifcfg-eth0 :
>
> DEVICE=eth0
> BOOTPROTO=static
> IPADDR=192.168.1.2
> NETMASK=255.255.255.0
> NETWORK=192.168.1.0
> BROADCAST=192.168.1.255
> # permit macaddr takeover
> MACADDR="00:02:B3:32:23:81"
> # do no start interface on boot let heartbeat start it
> ONBOOT=no
>

[Attachment #8 (text/html)]

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

<blockquote TYPE=CITE>&nbsp;</blockquote>
this one is FREE of use (largely inspired from IPADDR), but RH-specific
:-(
<p>his name is IF
<blockquote TYPE=CITE>&nbsp;
<br>#!/bin/sh
<br>#
<br># $Id$
<br>#
<br># This script manages IP interfaces takeover
<br>#
<br># usage: $0 if-name {start|stop|status}
<br>#
<br># The "start" arg start the interface
<br>#
<br># Surprisingly, the "stop" stop it
<br>#
<br>#
<p>LC_ALL=en; export LC_ALL # Make ifconfig work in France for David Jules
:-)
<p>. /etc/ha.d/shellfuncs
<p>#
<br># shutdown interface
<br>#
<br>ip_stop() {
<br>&nbsp; /etc/sysconfig/network-scripts/ifdown $1
<br>&nbsp; /sbin/ifconfig $1 inet 0.0.0.0 down
<br>&nbsp; ha_log "IF $1 released"
<br>}
<br>&nbsp;
<p>#
<br># startup interface
<br>#
<br>ip_start() {
<br>&nbsp; /etc/sysconfig/network-scripts/ifup $1
<br>&nbsp; ha_log "IF $1 started"
<br>}
<p>ip_status() {
<p>&nbsp; . /etc/sysconfig/network-scripts/ifcfg-$1
<p>&nbsp; if
<br>&nbsp;&nbsp;&nbsp; /sbin/ifconfig $1 | fgrep "inet adr:$IPADDR " >/dev/null
2>&amp;1
<br>&nbsp; then
<br>&nbsp;&nbsp;&nbsp; echo "running"
<br>&nbsp; else
<br>&nbsp;&nbsp;&nbsp; echo "stopped"
<br>&nbsp; fi
<br>}
<p>#
<br># start or stop interface
<br>#
<br>case $2 in
<br>&nbsp; start) ip_start $1;;
<br>&nbsp; stop)&nbsp; ip_stop $1;;
<br>&nbsp; status) ip_status $1;;
<br>esac
<p>// sample /etc/sysconfig/network-scripts/ifcfg-eth0 :
<p>DEVICE=eth0
<br>BOOTPROTO=static
<br>IPADDR=192.168.1.2
<br>NETMASK=255.255.255.0
<br>NETWORK=192.168.1.0
<br>BROADCAST=192.168.1.255
<br># permit macaddr takeover
<br><b>MACADDR="00:02:B3:32:23:81"</b>
<br># do no start interface on boot let heartbeat start it
<br><b>ONBOOT=no</b>
<br>&nbsp;</blockquote>
<FONT SIZE=2 COLOR=BLUE><PRE>*** Ce message a été vérifié par un anti-virus ***
</PRE></FONT>
</html>

["edillmann.vcf" (text/x-vcard)]
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.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