diff --git a/bundles/apt/files/do-unattended-upgrades b/bundles/apt/files/do-unattended-upgrades index be56863..5eb8adf 100644 --- a/bundles/apt/files/do-unattended-upgrades +++ b/bundles/apt/files/do-unattended-upgrades @@ -29,6 +29,10 @@ then fi % endif +% for command in sorted(additional_update_commands): +${command} +% endfor + % for affected, restarts in sorted(restart_triggers.items()): up_since=$(systemctl show "${affected}" | sed -n 's/^ActiveEnterTimestamp=//p' || echo 0) up_since_ts=$(date -d "$up_since" +%s || echo 0) diff --git a/bundles/apt/items.py b/bundles/apt/items.py index 7d40483..ae0f87a 100644 --- a/bundles/apt/items.py +++ b/bundles/apt/items.py @@ -55,6 +55,7 @@ files = { 'content_type': 'mako', 'mode': '0700', 'context': { + 'additional_update_commands': node.metadata.get('apt/additional_update_commands', set()), 'clean_old_kernels': node.metadata.get('apt/clean_old_kernels', True), 'restart_triggers': node.metadata.get('apt/restart_triggers', {}), }