then
if ifclass VM; then
cat > $target/etc/network/interfaces <<-EOF
- # installed by FAI
+ # generated by FAI
auto lo $NIC1
iface lo inet loopback
iface $NIC1 inet dhcp
netmask $NETMASK
broadcast $BROADCAST
gateway $GATEWAYS
- hwaddress ether $(cat /sys/class/net/$NIC1/address)
EOF
[ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
if [ ! -L $target/etc/resolv.conf -a -e /etc/resolv.conf ]; then
# Add debug to -f flag for more verbose output.
std_arg="-u nfs://faiserver/srv/fai/config"
-fai-chboot -Iv $std_arg default # reset so we are idempotent
+e fai-chboot -Iv $std_arg default # reset so we are idempotent
kernel=$(fai-chboot -L '^default$' | awk '{print $3}')
type -t host &>/dev/null || apt-get -y install dnsutils
# resolve host using gateway address