reboot_required_notify: move all code to a ::wheezy class.
It doesn't work on Jessie and newer (#1).
This commit is contained in:
parent
58cfaa32f9
commit
e2ea89aa7a
2 changed files with 23 additions and 17 deletions
|
@ -1,21 +1,5 @@
|
|||
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'],
|
||||
}
|
||||
class { 'apt::reboot_required_notify::wheezy': }
|
||||
|
||||
}
|
||||
|
|
22
manifests/reboot_required_notify/wheezy.pp
Normal file
22
manifests/reboot_required_notify/wheezy.pp
Normal file
|
@ -0,0 +1,22 @@
|
|||
class apt::reboot_required_notify::wheezy {
|
||||
|
||||
# On Wheezy and older, 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'],
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue