rm -f $TARGET/etc/udev/rules.d/70-persistent-net.rules
+touch $TARGET/etc/udev/rules.d/75-cd-aliases-generator.rules
+touch $TARGET/etc/udev/rules.d/75-persistent-net-generator.rules
+
if [ "$NIC_COUNT" -ge 1 ]; then
cat > $TARGET/etc/network/interfaces << EOF
# /etc/network/interfaces
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 <<EOF
# /etc/resolv.conf
nameserver 206.12.19.21
EOF
+# clean up etc/hosts
+cat > $TARGET/etc/hosts << EOF
+127.0.0.1 localhost
+${NIC_0_IP} ${fqdn} ${fqdn%%.*}
+
+# 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: