X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fganeti2%2Ftemplates%2Finstance-debootstrap%2Fhooks%2F00-dsa-configure-networking.erb;h=fe2a281880f6a5979023b179d7b33a52edd58a90;hb=68c6d6dea85c499a6b2788a4d96215adb7df9f32;hp=9662aaff49d13729c849b922edd766b7c682d1e0;hpb=19d9ea804e084e5013b75d484244b5c50aebd545;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 9662aaff..fe2a2818 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 @@ -46,14 +46,17 @@ fi if [ "$NIC_COUNT" -ge 2 ]; then cat >> $TARGET/etc/network/interfaces << EOF + auto eth1 iface eth1 inet static - address ${NIC_0_IP} + address ${NIC_1_IP} netmask 255.255.255.0 EOF fi +fqdn=$(cat $TARGET/etc/hostname) +echo ${fqdn%%.*} > $TARGET/etc/hostname cat > $TARGET/etc/resolv.conf < $TARGET/etc/hosts << EOF +127.0.0.1 localhost + +# The following lines are desirable for IPv6 capable hosts +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +EOF + exit 0 # vim:set syn=sh: