#!/bin/bash set -e if [ -z "$TARGET" -o ! -d "$TARGET" ]; then echo "Missing target directory" exit 1 fi if [ ! -d "$TARGET/etc/network" ]; then echo "Missing target network directory" exit 1 fi if [ -z "$NIC_COUNT" ]; then echo "Missing NIC COUNT" exit 1 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/resolv.conf <