From 3351678f2ecaa0703bce591c0e0c8395e69caa29 Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Thu, 5 Mar 2020 20:20:23 +0000 Subject: [PATCH] Imported 2.649 No reason for CPC update specified. --- debian/changelog | 6 ++++++ .../includes.binary/overlay/etc/cloud/cloud.cfg | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5bef7141..2910bb99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.649) focal; urgency=medium + + * Fix autoinstall-extracting runcmd in the case no user-data is passed. + + -- Michael Hudson-Doyle Thu, 05 Mar 2020 15:36:25 +0100 + livecd-rootfs (2.648) focal; urgency=medium * Enable cloud-init in live server installer live session on all diff --git a/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg b/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg index a738bf15..ae6ce8a7 100644 --- a/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg +++ b/live-build/ubuntu-server/includes.binary/overlay/etc/cloud/cloud.cfg @@ -126,6 +126,6 @@ runcmd: user_data = yaml.safe_load(subprocess.run([ "cloud-init", "query", "userdata"], check=True, stdout=subprocess.PIPE, encoding='utf-8').stdout) - if 'autoinstall' in user_data: + if user_data is not None and 'autoinstall' in user_data: with open("/autoinstall.yaml", "w") as fp: yaml.dump(user_data['autoinstall'], fp)