From 577d4f260b78d05c9a9435b8cec5f07cb2771d02 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 16 Jul 2013 16:07:46 +1000 Subject: Add a hook to allow the network name to be hacked Signed-off-by: Martin Schwenke --- autocluster | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'autocluster') 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" -- cgit