if [ "$NIC_COUNT" -ge 2 ]; then
cat >> $TARGET/etc/network/interfaces << EOF
+
auto eth1
iface eth1 inet static
address ${NIC_1_IP}
fi
+fqdn=$(cat $TARGET/etc/hostname)
+echo ${fqdn%%.*} > $TARGET/etc/hostname
cat > $TARGET/etc/resolv.conf <<EOF
# /etc/resolv.conf
EOF
# clean up etc/hosts
-cat > $TARGET/etc/hosts
+cat > $TARGET/etc/hosts << EOF
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts