Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
hi there!
i made a little script that activates/stops the virtual network devices,
when a failover takes place. these are virtual interfaces of the webserver.
we host several sites for customers, and they need a virtual ip address to
connect to their sites...
if i start heartbeat, all the services get up, apart from my own script. is
the syntax incorrect for heartbeat or what? the permissions are set correct.
or are my skills in bash scripting bad?
if i start the script manually, it works..
here is the script:
#!/bin/bash
#
# if-alias Bring up/down (only) aliased interfaces
cd /etc/sysconfig/network-scripts
. network-functions
interfaces=`ls ifcfg* | LANG=C egrep -e '(ifcfg-eth0:)' | cut -b 12-`
case "$1" in
'start')
rm -rf *~
for i in $interfaces; do
ifconfig eth0:$i 192.168.0.$i netmask 255.255.255.0 -arp 2>/dev/null
1>/dev/null
done
;;
'stop')
rm -rf *~
for i in $interfaces; do
ifconfig eth0:$i down 2>/dev/null 1>/dev/null
done
;;
*)
echo "Usage: "$0" { start | stop }"
;;
esac
exit 0
_________________________________________________________________
Highlight Viewer - heben Sie von Ihnen gesuchte Wörter auf Webseiten hervor.
http://toolbar.msn.ch?&DI=165&XAPID=2170