diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces b/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces index e3a7b795..1109fccd 100755 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces @@ -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 diff --git a/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces b/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces index 5e47a854..8d21932e 100755 --- a/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces +++ b/diskimage_builder/elements/simple-init/install.d/60-simple-init-remove-interfaces @@ -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