Signed-off-by: Stephen Gran <steve@lobefin.net>
- file { '/etc/motd.tail':
- notify => Exec['updatemotd'],
- content => template('motd/motd.erb')
- }
- file { '/etc/motd':
- ensure => link,
- target => '/var/run/motd'
+ if $::lsbdistcodename == 'wheezy' {
+ $fname = '/etc/update-motd.d/puppet-motd'
+ $notify = undef
+ $mode = '0555'
+
+ file { '/etc/motd':
+ ensure => present,
+ replace => false
+ }
+
+ } elsif $::lsbdistcodename == 'squeeze' {
+ $fname = '/etc/motd.tail'
+ $notify = Exec['updatemotd']
+ $mode = '0444'
+
+ file { '/etc/motd':
+ ensure => link,
+ target => '/var/run/motd'
+ }
+ exec { 'updatemotd':
+ command => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd',
+ refreshonly => true,
+ }
- exec { 'updatemotd':
- command => 'uname -snrvm > /var/run/motd && cat /etc/motd.tail >> /var/run/motd',
- refreshonly => true,
+ file { $fname:
+ notify => $notify,
+ mode => $mode,
+ content => template('motd/motd.erb')
+<% if @lsbdistcodename == 'wheezy' -%>
+#!/bin/bash
+
+cat <<EOD
+<% end -%>
This device is for authorized users only. All traffic on this device
is monitored and will be used as evidence for prosecutions. By using
This device is for authorized users only. All traffic on this device
is monitored and will be used as evidence for prosecutions. By using
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+<% if @lsbdistcodename == 'wheezy' -%>
+EOD
+<% end -%>
<%
# vim:set et:
# vim:set sts=2 ts=2:
<%
# vim:set et:
# vim:set sts=2 ts=2: