eventscripts: NAT gateway script should export CTDB_NATGW_NODES
authorMartin Schwenke <martin@meltin.net>
Tue, 15 Oct 2013 01:00:13 +0000 (12:00 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 22 Oct 2013 03:34:04 +0000 (14:34 +1100)
Otherwise calls to "ctdb natgwlist" will not behave as expected if a
non-standard file is used, since that command will use the default
file location.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/11.natgw

index 9faba8087d59fe4eea1b5bb7df93b560bbe368c7..2c62eca39a603655972ade29d68603b739f64022 100755 (executable)
@@ -11,7 +11,8 @@
 . $CTDB_BASE/functions
 loadconfig
 
-[ -z "$CTDB_NATGW_NODES" ] && exit 0
+[ -n "$CTDB_NATGW_NODES" ] || exit 0
+export CTDB_NATGW_NODES
 
 set_natgw_capability ()
 {