This commit is contained in:
sean
2019-07-15 15:21:47 -07:00
parent 86773da268
commit c266522598
+2
View File
@@ -271,6 +271,7 @@ echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
echo "" echo ""
echo "Writing network interfaces file..." echo "Writing network interfaces file..."
macaddr=$(echo $hostname|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/') macaddr=$(echo $hostname|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
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
for nic in "$nics"; do for nic in "$nics"; do
@@ -282,6 +283,7 @@ echo "echo \" bridge_ports $nics\" >> /etc/network/interfaces/br0" >> /mn
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
echo "systemctl unmask networking && systemctl enable networking" >> /mnt/setup-chroot.sh
echo "Done." echo "Done."