From bb9e97083502fec4f0c997604fdd3b544c8f3275 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 14 Aug 2023 15:33:27 +0200 Subject: [PATCH] Install netplan.io for Debian Bookworm Debian Cloud Images are shipped with netplan as a way to configure networking for Debian. Without netplan being installed, images built by DIB with cloud-init do not bring networking up, since systemd-networkd is not enabled after installation, and there are no other means to configure networking. Alternative approach could be to enable networkd, though it is better to be closer to official cloud images. Change-Id: I115ab83cf374819bc447fc1bd596e71326d13ed9 --- .../elements/debian/install.d/10-cloud-opinions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/diskimage_builder/elements/debian/install.d/10-cloud-opinions b/diskimage_builder/elements/debian/install.d/10-cloud-opinions index e35352ff..8693f085 100755 --- a/diskimage_builder/elements/debian/install.d/10-cloud-opinions +++ b/diskimage_builder/elements/debian/install.d/10-cloud-opinions @@ -37,3 +37,8 @@ if [ "$DIB_DEBIAN_ALT_INIT_PACKAGE" != "sysvinit" ]; then /etc/apt/preferences.d/sysvinit > /etc/apt/preferences.d/sysvinit fi +case "${DIB_RELEASE}" in + bookworm|stable|testing) + apt-get install -y netplan.io + ;; +esac