From d9ce44d73a0a6d91156bb94e03063d541b0f7579 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 18 Aug 2016 08:39:32 +0200 Subject: [PATCH] live-build/auto/build: If the image pre-installs network-manager, let it manage all devices by default by shipping a default netplan policy. Installing NM on an existing system only manages wifi and wwan, to avoid interfering with networkd managed devices on existing server/cloud instances. --- debian/changelog | 10 ++++++++++ live-build/auto/build | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index 72bcf1a3..fd51da1f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +livecd-rootfs (2.427) UNRELEASED; urgency=medium + + * live-build/auto/build: If the image pre-installs network-manager, let it + manage all devices by default by shipping a default netplan policy. + Installing NM on an existing system only manages wifi and wwan, to avoid + interfering with networkd managed devices on existing server/cloud + instances. + + -- Martin Pitt Thu, 18 Aug 2016 08:37:39 +0200 + livecd-rootfs (2.426) yakkety; urgency=medium * live-build/ubuntu-core/hooks/400-create-apt-get-warning.binary diff --git a/live-build/auto/build b/live-build/auto/build index 0ce13893..f8809119 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -716,3 +716,17 @@ case $PROJECT in fi ;; esac + +# If the image pre-installs network-manager, let it manage all devices by +# default. Installing NM on an existing system only manages wifi and wwan via +# /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf. When setting +# the global backend to NM, netplan overrides that file. +if [ -d chroot/usr/lib/NetworkManager ]; then + mkdir -p chroot/etc/netplan + cat < chroot/etc/netplan/01-network-manager-all.yaml +# Let NetworkManager manage all devices on this system +network: + version 2 + renderer: NetworkManager +EOF +fi