X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fganeti2%2Ftemplates%2Finstance-debootstrap%2Fhooks%2F00-dsa-configure-networking.erb;h=5db20ee2b7ce5ec146dec2cac623bc47663db3ef;hb=7ab5198283d21673db8e4e835b2e0592a7030971;hp=ed7bf9eb45faac98835bf18afe190c24bde77f79;hpb=d59e16df347e44b906b6a11b9c6ceee9026d425d;p=dsa-puppet.git diff --git a/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb b/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb index ed7bf9eb..5db20ee2 100755 --- a/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb +++ b/modules/ganeti2/templates/instance-debootstrap/hooks/00-dsa-configure-networking.erb @@ -19,9 +19,8 @@ fi rm -f $TARGET/etc/udev/rules.d/70-persistent-net.rules -if [ "$NIC_COUNT" -gt 0 ]; then - - cat > $TARGET/etc/network/interfaces < $TARGET/etc/network/interfaces << EOF # /etc/network/interfaces auto lo @@ -38,11 +37,21 @@ iface eth0 inet static up ip r add default via 2607:f8f0:610:4000::1 src 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS dev \$IFACE down ip r del default via 2607:f8f0:610:4000::1 src 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS dev \$IFACE down ip addr del 2607:f8f0:610:4000:6564:0a62:\$IF_ADDRESS/64 dev \$IFACE +EOF + +fi +if [ "$NIC_COUNT" -ge 2 ]; then + cat >> $TARGET/etc/network/interfaces << EOF +auto eth1 +iface eth1 inet static + address ${NIC_0_IP} + netmask 255.255.255.0 EOF fi + cat > $TARGET/etc/resolv.conf <