reboot_required_notify::wheezy: add an "ensure" parameter, defaulting to "present".
This commit is contained in:
parent
e2ea89aa7a
commit
a82e3ae272
1 changed files with 3 additions and 2 deletions
|
@ -1,17 +1,18 @@
|
||||||
class apt::reboot_required_notify::wheezy {
|
class apt::reboot_required_notify::wheezy ($ensure = present) {
|
||||||
|
|
||||||
# On Wheezy and older, this package installs the script that created
|
# On Wheezy and older, this package installs the script that created
|
||||||
# /var/run/reboot-required*.
|
# /var/run/reboot-required*.
|
||||||
# This script (/usr/share/update-notifier/notify-reboot-required) is
|
# This script (/usr/share/update-notifier/notify-reboot-required) is
|
||||||
# triggered e.g. by kernel packages.
|
# triggered e.g. by kernel packages.
|
||||||
package { 'update-notifier-common':
|
package { 'update-notifier-common':
|
||||||
ensure => installed,
|
ensure => $ensure,
|
||||||
}
|
}
|
||||||
|
|
||||||
# cron-apt defaults to run every night at 4 o'clock
|
# cron-apt defaults to run every night at 4 o'clock
|
||||||
# plus some random time <1h.
|
# plus some random time <1h.
|
||||||
# so we check if a reboot is required a bit later.
|
# so we check if a reboot is required a bit later.
|
||||||
cron { 'apt_reboot_required_notify':
|
cron { 'apt_reboot_required_notify':
|
||||||
|
ensure => $ensure,
|
||||||
command => 'if [ -f /var/run/reboot-required ]; then echo "Reboot required\n" ; cat /var/run/reboot-required.pkgs ; fi',
|
command => 'if [ -f /var/run/reboot-required ]; then echo "Reboot required\n" ; cat /var/run/reboot-required.pkgs ; fi',
|
||||||
user => root,
|
user => root,
|
||||||
hour => 5,
|
hour => 5,
|
||||||
|
|
Loading…
Reference in a new issue