summaryrefslogtreecommitdiffstats
path: root/autocluster
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-07-16 16:07:46 +1000
committerMartin Schwenke <martin@meltin.net>2013-07-16 16:22:54 +1000
commit577d4f260b78d05c9a9435b8cec5f07cb2771d02 (patch)
treeda0c12e5eda69206175c240cc21d3c2a127aa7ad /autocluster
parent14b6f56c835ecf80486da21bd72c1776cd0c7086 (diff)
downloadautocluster-577d4f260b78d05c9a9435b8cec5f07cb2771d02.tar.gz
autocluster-577d4f260b78d05c9a9435b8cec5f07cb2771d02.tar.xz
autocluster-577d4f260b78d05c9a9435b8cec5f07cb2771d02.zip
Add a hook to allow the network name to be hacked
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'autocluster')
-rwxr-xr-xautocluster8
1 files changed, 8 insertions, 0 deletions
diff --git a/autocluster b/autocluster
index 37681a8..df4ed57 100755
--- a/autocluster
+++ b/autocluster
@@ -273,6 +273,8 @@ create_node_null () {
:
}
+hack_network_map_hooks=""
+
# Uses: CLUSTER, NAME, NETWORKS, FIRSTIP, ip_offset
make_network_map ()
{
@@ -302,6 +304,12 @@ make_network_map ()
local ip="${net%.*}.${IPNUM}"
local mask="255.255.255.0"
+
+ # This can be used to override the variables in the echo
+ # statement below. The hook can use any other variables
+ # available in this function.
+ run_hooks hack_network_map_hooks
+
echo "${netname} ${dev} ${ip} ${mask} ${mac} ${opts}"
count=$(($count + 1))
done >"$network_map"