+
+ if versioncmp($::lsbmajdistrelease, '9') == 0 { # older puppets do facts as strings.
+ if $::processorcount > 1 {
+ package { 'irqbalance': ensure => installed }
+ }
+ } else {
+ # 926967 drops the recommendation on irqbalance in Buster
+ package { 'irqbalance': ensure => purged }
+ }
+
+
+ # https://www.decadent.org.uk/ben/blog/bpf-security-issues-in-debian.html
+ base::sysctl { 'unprivileged_bpf_disabled':
+ key => 'kernel.unprivileged_bpf_disabled',
+ value => '1',
+ }
+
+ # Disable kpartx udev rules
+ file { '/etc/udev/rules.d/60-kpartx.rules':
+ ensure => $has_lib_udev_rules_d_60_kpartx_rules ? { true => 'present', default => 'absent' },
+ content => "",
+ mode => '0444',
+ }
+
+ # this is only to avoid warnings, else puppet will complain that we
+ # have a symlink there, even if we're not replacing it anyhow.
+ if ! $has_etc_ssh_ssh_known_hosts {
+ file { '/etc/ssh/ssh_known_hosts':
+ ensure => 'present',
+ replace => 'no',
+ content => inline_template('<%= open("/etc/ssh/ssh_known_hosts").read() %>'),
+ notify => Exec['ud-replicate'],
+ }
+ }
+
+ exec { 'ud-replicate':
+ path => '/usr/bin:/usr/sbin:/bin:/sbin',
+ command => '/usr/bin/ud-replicate',
+ refreshonly => true,
+ require => Package['userdir-ldap']
+ }
+
+ # some changes require rebuilding the initramfs. Have the common exec here.
+ exec { 'update-initramfs -u':
+ path => '/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin',
+ refreshonly => true;
+ }