/etc/sysconfig/nfs can now discover the public ipaddress automagically
authorRonnie Sahlberg <sahlberg@ronnie>
Tue, 7 Aug 2007 21:58:13 +0000 (07:58 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Tue, 7 Aug 2007 21:58:13 +0000 (07:58 +1000)
web/nfs.html

index b10171acac62cc31bb9665f404c5c8c1c5531614..ae37774d6d1f2eff24de70491562c1cbc6258c2a 100644 (file)
@@ -43,7 +43,10 @@ This file should look something like :
   LOCKD_TCPPORT=599
   LOCKD_UDPPORT=599
   STATD_SHARED_DIRECTORY=/gpfs0/nfs-state
-  STATD_HOSTNAME="ctdb -P $STATD_SHARED_DIRECTORY/192.168.1.1 -H /etc/ctdb/statd-callout -p 97"
+  PUBLIC_IP=`ctdb publicip 2>/dev/null`
+  [ -z "$PUBLIC_IP" ] || {
+    STATD_HOSTNAME="ctdb -P "$STATD_SHARED_DIRECTORY/$PUBLIC_IP" -H /etc/ctdb/statd-callout -p 97"
+  }
 </pre>
 
 The CTDB_MANAGES_NFS line tells the events scripts that CTDB is to manage startup and shutdown of the NFS and NFSLOCK services.<br>