Merge "debootstrap: avoid duplicate network configuration"
This commit is contained in:
commit
f054e5f24a
@ -26,7 +26,10 @@ echo $DISTRO_NAME > /etc/hostname
|
|||||||
|
|
||||||
# cloud images expect eth0 and eth1 to use dhcp.
|
# cloud images expect eth0 and eth1 to use dhcp.
|
||||||
mkdir -p /etc/network/interfaces.d
|
mkdir -p /etc/network/interfaces.d
|
||||||
echo "source /etc/network/interfaces.d/*" >> /etc/network/interfaces
|
if ! grep -E -q '^source(|-directory) /etc/network/interfaces.d/\*' /etc/network/interfaces; then
|
||||||
|
echo "source /etc/network/interfaces.d/*" >> /etc/network/interfaces
|
||||||
|
echo 'Network configuration set to source /etc/network/interfaces.d/*'
|
||||||
|
fi
|
||||||
for interface in eth0 eth1; do
|
for interface in eth0 eth1; do
|
||||||
cat << EOF | tee /etc/network/interfaces.d/$interface
|
cat << EOF | tee /etc/network/interfaces.d/$interface
|
||||||
auto $interface
|
auto $interface
|
||||||
|
Loading…
Reference in New Issue
Block a user