test
sean 7 years ago
parent 86773da268
commit c266522598

@ -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."

Loading…
Cancel
Save