From fab9a41024d3c6b1f0d3ac6b660c0aed0c05645b Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 11 May 2021 06:21:42 +0200 Subject: [PATCH] bundles/c3voc-addons: use new way of doing updates, too --- bundles/c3voc-addons/files/do-unattended-upgrades | 1 + bundles/c3voc-addons/files/upgrade-and-reboot.conf | 1 + bundles/c3voc-addons/items.py | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 120000 bundles/c3voc-addons/files/do-unattended-upgrades create mode 120000 bundles/c3voc-addons/files/upgrade-and-reboot.conf diff --git a/bundles/c3voc-addons/files/do-unattended-upgrades b/bundles/c3voc-addons/files/do-unattended-upgrades new file mode 120000 index 0000000..6709b17 --- /dev/null +++ b/bundles/c3voc-addons/files/do-unattended-upgrades @@ -0,0 +1 @@ +../../apt/files/do-unattended-upgrades \ No newline at end of file diff --git a/bundles/c3voc-addons/files/upgrade-and-reboot.conf b/bundles/c3voc-addons/files/upgrade-and-reboot.conf new file mode 120000 index 0000000..cfcc1e5 --- /dev/null +++ b/bundles/c3voc-addons/files/upgrade-and-reboot.conf @@ -0,0 +1 @@ +../../apt/files/upgrade-and-reboot.conf \ No newline at end of file diff --git a/bundles/c3voc-addons/items.py b/bundles/c3voc-addons/items.py index 944456f..c1e2822 100644 --- a/bundles/c3voc-addons/items.py +++ b/bundles/c3voc-addons/items.py @@ -63,14 +63,21 @@ files = { '/etc/kernel/postinst.d/unattended-upgrades': { 'source': 'kernel-postinst.d', }, + '/etc/upgrade-and-reboot.conf': { + 'content_type': 'mako', + }, '/usr/local/share/icinga/plugins/check_unattended_upgrades': { 'mode': '0755', }, '/usr/local/sbin/upgrade-and-reboot': { + 'mode': '0700', + }, + '/usr/local/sbin/do-unattended-upgrades': { 'content_type': 'mako', 'mode': '0700', 'context': { - 'data': node.metadata.get('apt/unattended-upgrades', {}), + 'clean_old_kernels': node.metadata.get('apt/clean_old_kernels', True), + 'restart_triggers': node.metadata.get('apt/restart_triggers', {}), } }, }