test
sean 7 years ago
parent 181806cdd3
commit 856a40b3f0

@ -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 "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 \"auto lo br0\" > /etc/network/interfaces" >> /mnt/setup-chroot.sh
echo "echo \"iface lo inet loopback\" >> /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 for nic in "$nics"; do
echo "echo \"iface ${nic} inet manual\" >> /etc/network/interfaces" >> /mnt/setup-chroot.sh echo "echo \"iface ${nic} inet manual\" >> /etc/network/interfaces" >> /mnt/setup-chroot.sh
niclist="$niclist $nic"
done done
echo "echo \"iface br0 inet dhcp\" >> /etc/network/interfaces.d/br0" >> /mnt/setup-chroot.sh 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 \" 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 \" 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 \" 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 echo "echo \"source-directory /etc/network/interfaces.d\" > /etc/network/interfaces" >> /mnt/setup-chroot.sh

Loading…
Cancel
Save