From f8980538c1e27335d23e971e10487962091c5bb4 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 9 Oct 2015 16:39:19 -0400 Subject: Improve unattended-upgrades origin selectors * On squeeze, use release fact instead of hardcoded release name * On wheezy, special-case because codename selector is not available * On jessie and up, start pulling in point-release updates. The codename selector ensures that we won't be upgrading to a new release automatically. --- templates/50unattended-upgrades.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb index 2afebfe..7c65d10 100644 --- a/templates/50unattended-upgrades.erb +++ b/templates/50unattended-upgrades.erb @@ -7,12 +7,16 @@ Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}-backports"; <% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'squeeze' -%> Unattended-Upgrade::Allowed-Origins { - "${distro_id}:oldoldstable"; + "${distro_id}:<%= scope.lookupvar('::debian_release') %>"; "${distro_id}:squeeze-lts"; -<% else -%> +<% elsif scope.lookupvar('::operatingsystem') == 'Debian' and scope.lookupvar('::debian_codename') == 'wheezy' -%> Unattended-Upgrade::Origins-Pattern { "origin=Debian,archive=<%= scope.lookupvar('::debian_release') %>,label=Debian-Security"; "origin=Debian,archive=${distro_codename}-lts"; +<% else -%> +Unattended-Upgrade::Origins-Pattern { + "origin=Debian,codename=${distro_codename},label=Debian"; + "origin=Debian,codename=${distro_codename},label=Debian-Security"; <% end -%> }; -- cgit v1.2.3