summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_apt_configure.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2019-08-19 21:37:29 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-08-19 21:37:29 +0000
commit85878703e80f536168bcf86cc6444f7aba44cdc3 (patch)
tree9358683804949cd5d48a569aaa986e3b3f20107b /cloudinit/config/cc_apt_configure.py
parent2c52e6e88b19f5db8d55eb7280ee27703e05d75f (diff)
downloadvyos-cloud-init-85878703e80f536168bcf86cc6444f7aba44cdc3.tar.gz
vyos-cloud-init-85878703e80f536168bcf86cc6444f7aba44cdc3.zip
ubuntu-drivers: emit latelink=true debconf to accept nvidia eula
To accept NVIDIA EULA, cloud-init needs to emit latelink=true debconf setting to the linux-restricted-modules package to allow NVIDIA drivers to properly link to the running kernel. LP: #1840080
Diffstat (limited to 'cloudinit/config/cc_apt_configure.py')
-rw-r--r--cloudinit/config/cc_apt_configure.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index 919d1995..f01e2aaf 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -332,6 +332,8 @@ def apply_apt(cfg, cloud, target):
def debconf_set_selections(selections, target=None):
+ if not selections.endswith(b'\n'):
+ selections += b'\n'
util.subp(['debconf-set-selections'], data=selections, target=target,
capture=True)
@@ -374,7 +376,7 @@ def apply_debconf_selections(cfg, target=None):
selections = '\n'.join(
[selsets[key] for key in sorted(selsets.keys())])
- debconf_set_selections(selections.encode() + b"\n", target=target)
+ debconf_set_selections(selections.encode(), target=target)
# get a complete list of packages listed in input
pkgs_cfgd = set()