diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-11-20 14:16:15 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2014-11-25 11:24:56 +1100 |
commit | d2b95463295b21fce7636a1373abca5282d14fa8 (patch) | |
tree | 12e9283195241d7c47bd6cc0c315b2b770ade562 /autocluster | |
parent | 56c33c7376523eb8db06b5be7d35be61290a9cb2 (diff) | |
download | autocluster-d2b95463295b21fce7636a1373abca5282d14fa8.tar.gz autocluster-d2b95463295b21fce7636a1373abca5282d14fa8.tar.xz autocluster-d2b95463295b21fce7636a1373abca5282d14fa8.zip |
Add IPv6 support
New configuration variable NETWORK_STACK.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'autocluster')
-rwxr-xr-x | autocluster | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/autocluster b/autocluster index 0eb26f5..0ae0f12 100755 --- a/autocluster +++ b/autocluster @@ -352,12 +352,14 @@ make_network_map () local ip="${net%.*}.${IPNUM}/${ip_bits#*/}" + local ipv6="fc00:${net//./:}::${IPNUM}/64" + # 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} ${mac} ${opts}" + echo "${netname} ${dev} ${ip} ${ipv6} ${mac} ${opts}" count=$(($count + 1)) done >"$network_map" } @@ -718,8 +720,8 @@ guess_install_network () # specified then use the IP address associated with it. INSTALL_IP="" INSTALL_GW="" - local netname dev ip mac opts - while read netname dev ip mac opts; do + local netname dev ip ipv6 mac opts + while read netname dev ip ipv6 mac opts; do local o for o in $opts ; do case "$o" in @@ -1007,8 +1009,8 @@ setup_network() diskimage rm_rf "/etc/udev/rules.d/70-persistent-net.rules" echo "Setting up network interfaces: " - local netname dev ip mac opts - while read netname dev ip mac opts; do + local netname dev ip ipv6 mac opts + while read netname dev ip ipv6 mac opts; do echo " $dev" local o gw addr mask @@ -1031,6 +1033,8 @@ TYPE=Ethernet IPADDR=$addr NETMASK=$mask HWADDR=$mac +IPV6INIT=yes +IPV6ADDR=$ipv6 ${gw:+GATEWAY=}${gw} EOF |