X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=templates%2Fmotd.erb;h=b186dc9172e7208313c5323f1e1733077bd0c00d;hb=feec4f0d69e0d7d95f29a22e533b15120c7e893f;hp=1881c41b37ec7b4378eb2ed5be147e75a21838c0;hpb=df35bbc39e29e0127e7320afdbe3f1d1267b3e9a;p=mirror%2Fdsa-puppet.git diff --git a/templates/motd.erb b/templates/motd.erb index 1881c41b3..b186dc917 100644 --- a/templates/motd.erb +++ b/templates/motd.erb @@ -1,8 +1,55 @@ This device is for authorized users only. All traffic on this device is monitored and will be used as evidence for prosecutions. -<% if File.exists?("/etc/puppet/modules/motd/files/" + fqdn + "/motd.tail") -%> +** IMPORTANT WARNING ** + +Please read: + +http://lists.debian.org/debian-devel-announce/2003/debian-devel-announce-200312/msg00001.html + +before doing anything on these machines - especially the "What to do +when you can login" section. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<%= File.open("/etc/puppet/modules/motd/files/" + fqdn + "/motd.tail").read -%> + +<%= +purp = '' +if nodeinfo.has_key?('nameinfo') + purp += nodeinfo['nameinfo'] + "\n\n" +end + +purp += 'Welcome to ' + fqdn +if (nodeinfo['ldap'].at(0)) and (nodeinfo['ldap'][0].has_key?('purpose')) + if nodeinfo['ldap'][0]['purpose'].include?('buildd') + purp += ", the Debian " + if nodeinfo['ldap'][0].has_key?('architecture') + purp += nodeinfo['ldap'][0]['architecture'][0] + end + purp += " build daemon\n" + elsif nodeinfo['ldap'][0]['purpose'].include?('porterbox') + purp += ", the Debian " + if nodeinfo['ldap'][0].has_key?('architecture') + purp += nodeinfo['ldap'][0]['architecture'][0] + end + purp += " porterbox\n" + else + purp += ", used for the following services:\n" + nodeinfo['ldap'][0]['purpose'].sort.each do |l| + if l =~ /\[\[(\*|-)?(.*?)\]\]/ + l = $2 + end + if l =~ /\[\[(.*?)\|(.*?)\]\]/ + l = $2 + end + purp += "\t" + l + "\n" + end + end +end + +if nodeinfo.has_key?('footer') + purp += "\n" + nodeinfo['footer'] + "\n" +end +purp +-%> + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -<% end -%>