diff --git a/setup.sh b/setup.sh index ed78adb..dc80e14 100644 --- a/setup.sh +++ b/setup.sh @@ -274,12 +274,14 @@ macaddr=$(echo $hostname|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1: echo "mkdir -p /etc/network && mkdir -p /etc/network/interfaces.d" >> /mnt/setup-chroot.sh echo "echo \"auto lo br0\" > /etc/network/interfaces" >> /mnt/setup-chroot.sh echo "echo \"iface lo inet loopback\" >> /etc/network/interfaces" >> /mnt/setup-chroot.sh +niclist="" for nic in "$nics"; do echo "echo \"iface ${nic} inet manual\" >> /etc/network/interfaces" >> /mnt/setup-chroot.sh + niclist="$niclist $nic" done echo "echo \"iface br0 inet dhcp\" >> /etc/network/interfaces.d/br0" >> /mnt/setup-chroot.sh echo "echo \" post-up ip link set br0 address $macaddr\" >> /etc/network/interfaces/br0" >> /mnt/setup-chroot.sh -echo "echo \" bridge_ports $nics\" >> /etc/network/interfaces/br0" >> /mnt/setup-chroot.sh +echo "echo \" bridge_ports${niclist}\" >> /etc/network/interfaces/br0" >> /mnt/setup-chroot.sh echo "echo \" bridge_stp on\" >> /etc/network/interfaces/br0" >> /mnt/setup-chroot.sh echo "echo \" dns-nameservers 127.0.0.53\" >> /etc/network/interfaces/br0" >> /mnt/setup-chroot.sh echo "echo \"source-directory /etc/network/interfaces.d\" > /etc/network/interfaces" >> /mnt/setup-chroot.sh