X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fmotd%2Fmanifests%2Finit.pp;h=d8fba15db3a56bd3de061e5cd36a366c89bd5b47;hb=7c041353f4da829d409830eba2e95946952e817f;hp=cb42099c110392ad9474aab485638f95048719c6;hpb=8e8f419024a630458be3566c6326cc88b3905364;p=mirror%2Fdsa-puppet.git diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index cb42099c1..d8fba15db 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -7,27 +7,31 @@ # include motd # class motd { - file { '/etc/update-motd.d': - ensure => directory, - mode => '0755' - } file { '/etc/motd.tail': ensure => absent, } - file { '/etc/motd': - ensure => link, - target => '/var/run/motd' - } - - file { '/etc/update-motd.d/puppet-motd': - notify => undef, - mode => '0555', - content => template('motd/motd.erb') - } - - exec { 'updatemotd': - command => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd', - refreshonly => true, + if versioncmp($::lsbmajdistrelease, '9') < 0 { + file { '/etc/motd': + ensure => link, + target => '/var/run/motd' + } + file { '/etc/update-motd.d': + ensure => directory, + mode => '0755' + } + file { '/etc/update-motd.d/puppet-motd': + notify => undef, + mode => '0555', + content => template('motd/motd.erb') + } + } else { + file { '/etc/update-motd.d/puppet-motd': + ensure => absent, + } + file { '/etc/motd': + notify => undef, + content => template('motd/motd.erb') + } } }