diff options
author | varac <varacanero@zeromail.org> | 2016-11-04 14:39:23 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-11-04 14:39:23 +0100 |
commit | 5d001efb65f4ac2afa39d17b7b62d4f861f450a3 (patch) | |
tree | 88b282297150f4890fce19182206dc9bfa0f3a9d /manifests/reboot_required_notify.pp | |
parent | 33c61e8df59db1abbed379a9e9790946060a8f1e (diff) | |
parent | 584b7aad338206026d62d846122e6bef532a2d2a (diff) |
Merge remote-tracking branch 'shared/master' into leap_master
Diffstat (limited to 'manifests/reboot_required_notify.pp')
-rw-r--r-- | manifests/reboot_required_notify.pp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/manifests/reboot_required_notify.pp b/manifests/reboot_required_notify.pp index 722e8a5..efd8aeb 100644 --- a/manifests/reboot_required_notify.pp +++ b/manifests/reboot_required_notify.pp @@ -1,21 +1,11 @@ class apt::reboot_required_notify { - # This package installs the script that created /var/run/reboot-required*. - # This script (/usr/share/update-notifier/notify-reboot-required) is - # triggered e.g. by kernel packages. - package { 'update-notifier-common': - ensure => installed, - } - - # cron-apt defaults to run every night at 4 o'clock - # plus some random time <1h. - # so we check if a reboot is required a bit later. - cron { 'apt_reboot_required_notify': - command => 'if [ -f /var/run/reboot-required ]; then echo "Reboot required\n" ; cat /var/run/reboot-required.pkgs ; fi', - user => root, - hour => 5, - minute => 20, - require => Package['update-notifier-common'], + if versioncmp($::operatingsystemmajrelease, 8) >= 0 { + class { 'apt::reboot_required_notify::jessie': } + # Clean up systems that were upgraded from Wheezy or earlier: + class { 'apt::reboot_required_notify::wheezy': ensure => absent } + } else { + class { 'apt::reboot_required_notify::wheezy': } } } |