1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Eventscripts - call ctdb_check_args() instead of doing hand checking

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit cc5bc1948dcbe8b8b25185260927b94a4b529174)
This commit is contained in:
Martin Schwenke 2011-08-23 16:36:19 +10:00
parent 7980a4cb44
commit bc4e62be85
2 changed files with 4 additions and 27 deletions

View File

@ -129,6 +129,8 @@ monitor_interfaces()
return 1
}
ctdb_check_args "$@"
case "$1" in
#############################
# called when ctdbd starts up
@ -158,10 +160,6 @@ case "$1" in
################################################
# called when ctdbd wants to claim an IP address
takeip)
if [ $# != 4 ]; then
echo "ERROR: must supply interface, IP and maskbits"
exit 1
fi
iface=$2
ip=$3
maskbits=$4
@ -181,11 +179,6 @@ case "$1" in
##################################################
# called when ctdbd wants to release an IP address
releaseip)
if [ $# != 4 ]; then
echo "ERROR: must supply interface, IP and maskbits"
exit 1
fi
# releasing an IP is a bit more complex than it seems. Once the IP
# is released, any open tcp connections to that IP on this host will end
# up being stuck. Some of them (such as NFS connections) will be unkillable
@ -220,11 +213,6 @@ case "$1" in
##################################################
# called when ctdbd wants to update an IP address
updateip)
if [ $# != 5 ]; then
echo "ERROR: must supply old interface, new interface, IP and maskbits"
exit 1
fi
# moving an IP is a bit more complex than it seems.
# First we drop all traffic on the old interface.
# Then we try to add the ip to the new interface and before

View File

@ -326,6 +326,8 @@ setup_per_ip_routing()
return $?;
}
ctdb_check_args "$@"
case "$1" in
#############################
# called when ctdbd starts up
@ -368,10 +370,6 @@ case "$1" in
################################################
# called when ctdbd wants to claim an IP address
takeip)
if [ $# != 4 ]; then
echo "must supply interface, IP and maskbits"
exit 1
fi
iface=$2
ip=$3
maskbits=$4
@ -410,10 +408,6 @@ case "$1" in
################################################
# called when ctdbd wants to claim an IP address
updateip)
if [ $# != 5 ]; then
echo "must supply old interface, new interface, IP and maskbits"
exit 1
fi
oiface=$2
niface=$3
ip=$4
@ -455,11 +449,6 @@ case "$1" in
##################################################
# called when ctdbd wants to release an IP address
releaseip)
if [ $# != 4 ]; then
echo "must supply interface, IP and maskbits"
exit 1
fi
iface=$2
ip=$3
maskbits=$4