apt::reboot_required_notify::jessie: manage APT pinning to fetch reboot-notifier from jessie-backports, when running on Jessie.
This commit is contained in:
parent
46b2f3d2e8
commit
e70a6712d3
1 changed files with 13 additions and 2 deletions
|
@ -1,5 +1,15 @@
|
||||||
class apt::reboot_required_notify::jessie ($ensure = present) {
|
class apt::reboot_required_notify::jessie ($ensure = present) {
|
||||||
|
|
||||||
|
$pinning_ensure = $::operatingsystemmajrelease ? {
|
||||||
|
8 => present,
|
||||||
|
default => absent,
|
||||||
|
}
|
||||||
|
apt::preferences_snippet { 'reboot-notifier':
|
||||||
|
ensure => $pinning_ensure,
|
||||||
|
pin => 'release o=Debian Backports,a=jessie-backports',
|
||||||
|
priority => 991,
|
||||||
|
}
|
||||||
|
|
||||||
# On Jessie and newer, this package installs the script that created
|
# On Jessie and newer, 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
|
||||||
|
@ -7,7 +17,8 @@ class apt::reboot_required_notify::jessie ($ensure = present) {
|
||||||
# This package also sends a daily email to the administrator when a system
|
# This package also sends a daily email to the administrator when a system
|
||||||
# reboot is required, e.g. due to a kernel update.
|
# reboot is required, e.g. due to a kernel update.
|
||||||
package { 'reboot-notifier':
|
package { 'reboot-notifier':
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
|
require => Apt::Preferences_snippet['reboot-notifier'],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue