diff options
author | Martin Schwenke <martin@meltin.net> | 2014-11-24 21:01:37 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2014-11-25 11:24:56 +1100 |
commit | 415d586cca66ded609b8f74a7acaece4bd88f57a (patch) | |
tree | 46d7d4f431b57e8bf3f505c47fc8793fb4124461 /config.d | |
parent | 85628a2ba97f28cdb21a3efade73c38304f28416 (diff) | |
download | autocluster-415d586cca66ded609b8f74a7acaece4bd88f57a.tar.gz autocluster-415d586cca66ded609b8f74a7acaece4bd88f57a.tar.xz autocluster-415d586cca66ded609b8f74a7acaece4bd88f57a.zip |
Remove netmask from network_map
This removes the /24 assumption, embeds the prefix into the ip field
and calculates netmask in the only place it is needed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'config.d')
-rw-r--r-- | config.d/00base.defconf | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/config.d/00base.defconf b/config.d/00base.defconf index e141e51..f366f1e 100644 --- a/config.d/00base.defconf +++ b/config.d/00base.defconf @@ -225,8 +225,6 @@ defconf DNSSEARCH "$DOMAIN" \ # * First network is private and contains the CTDB node addresses. # * Items look like: net/bits,dev[,nat|bridge=host_iface][,gw=gateway_ip] -# * Right now autocluster only supports 24 bit networks. This will -# be improved in the future. defconf NETWORKS "10.0.0.0/24,eth0,gw=10.0.0.1 10.0.1.0/24,eth1 10.0.2.0/24,eth2" \ "<list>" "description of IP networks" @@ -263,15 +261,6 @@ make_public_addresses() networks_post_config_hook () { - local n - for n in $NETWORKS ; do - local ip_mask="${n%%,*}" - local mask="${ip_mask#*/}" - - [ "$mask" = "24" ] || \ - die "Network maskbits other than 24 unsupported in \"$n\"" - done - [ -z "$IPBASE" -a -z "$IPNET0" -a -z "$IPNET1" -a -z "$IPNET2" ] || \ die "Configuration variables IPBASE, IPNET0/1/2 unsupported - please use NETWORKS" @@ -290,8 +279,8 @@ defconf NETWORK_TEMPLATE "|network_template" \ network_template () { - local netname dev ip mask mac opts - while read netname dev ip mask mac opts ; do + local netname dev ip mac opts + while read netname dev ip mac opts ; do cat <<EOF <interface type='network'> <mac address='${mac}'/> |