Rev 372: added an example ctdb event script in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue May 29 03:01:32 GMT 2007
------------------------------------------------------------
revno: 372
revision-id: tridge at samba.org-20070529030131-ibtgvkg6agfa0yyj
parent: tridge at samba.org-20070529025524-2xj1fw64ggc9iw9u
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-05-29 13:01:31 +1000
message:
added an example ctdb event script
added:
tools/events events-20070529030121-04fjh63cxfh8v1pj-1
=== added file 'tools/events'
--- a/tools/events 1970-01-01 00:00:00 +0000
+++ b/tools/events 2007-05-29 03:01:31 +0000
@@ -0,0 +1,39 @@
+#!/bin/sh
+# sample event script for ctdb
+
+cmd="$1"
+shift
+
+case $cmd in
+ takeip)
+ if [ $# != 3 ]; then
+ echo "must supply interface, IP and maskbits"
+ exit 1
+ fi
+ iface=$1
+ ip=$2
+ maskbits=$3
+ exec /sbin/ip add $ip/$maskbits dev $iface
+ exit 1
+ ;;
+
+ releaseip)
+ if [ $# != 3 ]; then
+ echo "must supply interface, IP and maskbits"
+ exit 1
+ fi
+ iface=$1
+ ip=$2
+ maskbits=$3
+ exec /sbin/ip del $ip/$maskbits dev $iface
+ exit 1
+ ;;
+
+ recovered)
+ # restart any services as necessary, like NFS
+ exit 0
+ ;;
+esac
+
+echo "Invalid command $cmd"
+exit 1
More information about the samba-cvs
mailing list