X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=templates%2Fmotd.erb;h=d0538d41e75e6d1eccc389786fb4c48372f5f502;hb=22446678cf567eb2c458a4dd30ce9c0282f4ad33;hp=01556838f3a14bd01d7b44284c31729bdafbc356;hpb=25196357553daf7a292150d1994219d46eefed67;p=mirror%2Fdsa-puppet.git diff --git a/templates/motd.erb b/templates/motd.erb index 01556838f..d0538d41e 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'].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 -%>