Rev 393: auto-restart NFS if its running when we release an IP in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed May 30 00:21:17 GMT 2007


------------------------------------------------------------
revno: 393
revision-id: tridge at samba.org-20070530002116-kz22u8npsxt6hhom
parent: tridge at samba.org-20070529125328-29gu0158ljg4rcgn
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-05-30 10:21:16 +1000
message:
  auto-restart NFS if its running when we release an IP
modified:
  tools/events                   events-20070529030121-04fjh63cxfh8v1pj-1
=== modified file 'tools/events'
--- a/tools/events	2007-05-29 09:34:04 +0000
+++ b/tools/events	2007-05-30 00:21:16 +0000
@@ -36,11 +36,18 @@
 	}
 	# if we have a local arp entry for this IP then remove it
 	/sbin/arp -d $ip 2> /dev/null
+	echo $ip >> /etc/ctdb/released_ips
 	exit 0
 	;;
 
      recovered)
         # restart any services as necessary, like NFS
+	# 
+	[ -f /etc/ctdb/released_ips ] && {
+		( /sbin/service nfs status > /dev/null 2>&1 && 
+                      /sbin/service nfs restart > /dev/null 2>&1 ) &
+	} > /dev/null 2>&1
+	/bin/rm -f /etc/ctdb/released_ips
 	exit 0
 	;;
 



More information about the samba-cvs mailing list