summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-10-09 16:39:19 -0400
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-10-09 16:39:19 -0400
commitf8980538c1e27335d23e971e10487962091c5bb4 (patch)
treea0f5c67e8b41eeebdc8111d2e1ffd6e77bfb79f6
parente4d777e5ec333c819a6b87b5c0186f67e86361ee (diff)
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.
-rw-r--r--templates/50unattended-upgrades.erb8
1 files 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 -%>
};