From: Peter Palfrader Date: Sat, 4 May 2013 15:01:56 +0000 (+0200) Subject: motd cleanups X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=124e041c35aba39832a92d262407b643f9b7b07b motd cleanups --- diff --git a/modules/motd/manifests/init.pp b/modules/motd/manifests/init.pp index b2003127..89362064 100644 --- a/modules/motd/manifests/init.pp +++ b/modules/motd/manifests/init.pp @@ -7,8 +7,7 @@ # include motd # class motd { - - if $::lsbdistcodename == 'wheezy' { + if $::lsbmajdistrelease >= 7 { $fname = '/etc/update-motd.d/puppet-motd' $notify = undef $mode = '0555' @@ -17,8 +16,10 @@ class motd { ensure => directory, mode => '0755' } - - } elsif $::lsbdistcodename == 'squeeze' { + file { '/etc/motd.tail': + ensure => absent, + } + } else { $fname = '/etc/motd.tail' $notify = Exec['updatemotd'] $mode = '0444' diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index d1c1c8e5..42edb0cb 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -1,4 +1,4 @@ -<% if @lsbdistcodename == 'wheezy' -%> +<% if @lsbmajdistrelease >= '7' -%> #!/bin/bash cat < +<% if @lsbmajdistrelease >= '7' -%> EOD <% end -%> <%