reboot_required_notify: add initial support for Jessie and newer.
Note that reboot-notifier is only in stretch/sid at the moment, so to use this one needs to configure APT pinning themselves to make this package installable.
This commit is contained in:
parent
a82e3ae272
commit
3630285006
2 changed files with 27 additions and 1 deletions
|
@ -1,5 +1,18 @@
|
||||||
class apt::reboot_required_notify {
|
class apt::reboot_required_notify {
|
||||||
|
|
||||||
class { 'apt::reboot_required_notify::wheezy': }
|
$jessie_or_newer = $::operatingsystemmajrelease ? {
|
||||||
|
5 => false,
|
||||||
|
6 => false,
|
||||||
|
7 => false,
|
||||||
|
default => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
if $jessie_or_newer {
|
||||||
|
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': }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
13
manifests/reboot_required_notify/jessie.pp
Normal file
13
manifests/reboot_required_notify/jessie.pp
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
class apt::reboot_required_notify::jessie ($ensure = present) {
|
||||||
|
|
||||||
|
# On Jessie and newer, 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.
|
||||||
|
# This package also sends a daily email to the administrator when a system
|
||||||
|
# reboot is required, e.g. due to a kernel update.
|
||||||
|
package { 'reboot-notifier':
|
||||||
|
ensure => $ensure,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue