update natgw eventscript to allow you to fore it to update and / or to remove the...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 6 Oct 2009 05:09:24 +0000 (16:09 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 6 Oct 2009 05:09:24 +0000 (16:09 +1100)
config/events.d/11.natgw

index bd3119727ea34b32de4c7cae8fc0384d6081099d..001b17b70b133e6df31cb53819cdd9f6ee3c4c92 100644 (file)
@@ -37,7 +37,7 @@ case $cmd in
        ctdb setnatgwstate on
        ;;
 
-     recovered)
+     recovered|updatenatgw)
        MYPNN=`ctdb pnn | cut -d: -f2`
        NATGWMASTER=`ctdb natgwlist | head -1 | sed -e "s/ .*//"`
        NATGWIP=`ctdb natgwlist | head -1 | sed -e "s/^[^ ]* *//"`
@@ -71,7 +71,7 @@ case $cmd in
        echo 1 > /proc/sys/net/ipv4/route/flush
        ;;
 
-     shutdown)
+     shutdown|removenatgw)
        delete_all
        ;;