From f6e5da24f97c4573a7e442691d56f25c2298f650 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 3 Mar 2020 14:09:42 +0100 Subject: [PATCH] enable cloud-init in live session on all architectures --- .../hooks/032-installer-squashfs.binary | 15 ++++++--------- .../overlay/etc/netplan/00-installer-config.yaml | 13 ------------- 2 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 live-build/ubuntu-server/includes.binary/overlay/etc/netplan/00-installer-config.yaml diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index c3b73f63..c988a6bb 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -60,10 +60,11 @@ EOF # Prepare installer layer. -# Install casper for live session magic. -chroot $INSTALLER_ROOT apt-get -y install lupin-casper -# Install linux-firmware for kernel to upload into hardware. -chroot $INSTALLER_ROOT apt-get -y install linux-firmware +# Install: +# 1. linux-firmware for kernel to upload into hardware. +# 2. casper for live session magic. +# 3. openssh-server to enable the "ssh into live session" feature +chroot $INSTALLER_ROOT apt-get -y install linux-firmware lupin-casper openssh-server # Make sure NoCloud is last values=$(echo get cloud-init/datasources | chroot $INSTALLER_ROOT debconf-communicate | sed 's/^0 //;s/NoCloud, //;s/None/NoCloud, None/') @@ -73,11 +74,7 @@ printf "%s\t%s\t%s\t%s\n" \ chroot $INSTALLER_ROOT dpkg-reconfigure --frontend=noninteractive cloud-init if [ `dpkg --print-architecture` = s390x ]; then - chroot $INSTALLER_ROOT apt-get -y install s390-tools-zkey openssh-server - rm $INSTALLER_ROOT/etc/netplan/00-installer-config.yaml -else - # Don't let cloud-init run in the live session. - touch $INSTALLER_ROOT/etc/cloud/cloud-init.disabled + chroot $INSTALLER_ROOT apt-get -y install s390-tools-zkey fi chroot $INSTALLER_ROOT apt-get clean diff --git a/live-build/ubuntu-server/includes.binary/overlay/etc/netplan/00-installer-config.yaml b/live-build/ubuntu-server/includes.binary/overlay/etc/netplan/00-installer-config.yaml deleted file mode 100644 index b8399cb6..00000000 --- a/live-build/ubuntu-server/includes.binary/overlay/etc/netplan/00-installer-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# This is the initial network config. -# It can be overwritten by cloud-init or subiquity. -network: - version: 2 - ethernets: - all-en: - match: - name: "en*" - dhcp4: true - all-eth: - match: - name: "eth*" - dhcp4: true