module-apt/manifests/reboot_required_notify.pp
Gabriel Filion ded81d8edc Apply code style corrections from puppet-lint
Signed-off-by: Gabriel Filion <lelutin@gmail.com>

+ more linting by intrigeri.

Conflicts:
	manifests/apticron.pp
	manifests/cron/dist_upgrade.pp
	manifests/cron/download.pp
	manifests/dist_upgrade/initiator.pp
	manifests/init.pp
	manifests/listchanges.pp
	manifests/preferences.pp
	manifests/preseeded_package.pp
	manifests/proxy_client.pp
	manifests/unattended_upgrades.pp
	manifests/update.pp
2013-01-02 17:28:59 +01:00

21 lines
709 B
Puppet

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'],
}
}