motd cleanups
authorPeter Palfrader <peter@palfrader.org>
Sat, 4 May 2013 15:01:56 +0000 (17:01 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 4 May 2013 15:01:56 +0000 (17:01 +0200)
modules/motd/manifests/init.pp
modules/motd/templates/motd.erb

index b200312..8936206 100644 (file)
@@ -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'
index d1c1c8e..42edb0c 100644 (file)
@@ -1,4 +1,4 @@
-<% if @lsbdistcodename == 'wheezy' -%>
+<% if @lsbmajdistrelease >= '7' -%>
 #!/bin/bash
 
 cat <<EOD
@@ -145,7 +145,7 @@ purp
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-<% if @lsbdistcodename == 'wheezy' -%>
+<% if @lsbmajdistrelease >= '7' -%>
 EOD
 <% end -%>
 <%