Merge "Fix /etc/network/interfaces file contents"

This commit is contained in:
Zuul 2018-07-10 07:46:56 +00:00 committed by Gerrit Code Review
commit bbf69a90f3
2 changed files with 10 additions and 2 deletions

View file

@ -25,6 +25,10 @@ rm -f /etc/conf.d/net*
if [ -f "/etc/network/interfaces" ]; then
printf "auto lo\niface lo inet loopback\n\n" > /etc/network/interfaces
if [ -d "/etc/network/interfaces.d/" ]; then
printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces
if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then
printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces
else
printf "source /etc/network/interfaces.d/*\n\n" >> /etc/network/interfaces
fi
fi
fi

View file

@ -28,6 +28,10 @@ rm -f /etc/conf.d/net*
if [ -f "/etc/network/interfaces" ]; then
printf "auto lo\niface lo inet loopback\n\n" > /etc/network/interfaces
if [ -d "/etc/network/interfaces.d/" ]; then
printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces
if [ "$DISTRO_NAME" == "ubuntu" ] && [ "$DIB_RELEASE" == "trusty" ]; then
printf "source-directory interfaces.d\n\n" >> /etc/network/interfaces
else
printf "source /etc/network/interfaces.d/*\n\n" >> /etc/network/interfaces
fi
fi
fi