]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
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 b200312722781191961dee53acee6b9e50ef7cc7..8936206439d406bb16f77436477f963d5c2eee11 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 d1c1c8e50cec370ddbc57395e667533a253adda7..42edb0cbc639a4eb80b0bce39a42d9fdd2642d11 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 -%>
 <%