A little more whitespace. It wasn't big enough
[mirror/dsa-puppet.git] / modules / motd / templates / motd.erb
1
2 This device is for authorized users only.  All traffic on this device
3 is monitored and will be used as evidence for prosecutions.
4
5 ** IMPORTANT WARNING **
6
7 Please read:
8
9 http://lists.debian.org/debian-devel-announce/2003/debian-devel-announce-200312/msg00001.html
10
11 before doing anything on these machines - especially the "What to do
12 when you can login" section.
13
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
16 <%=
17 purp = ''
18 if nodeinfo.has_key?('nameinfo')
19   purp += nodeinfo['nameinfo'] + "\n\n"
20 end
21
22 purp += 'Welcome to ' + fqdn
23 if (nodeinfo['ldap'].at(0)) and (nodeinfo['ldap'][0].has_key?('purpose'))
24   if nodeinfo['ldap'][0]['purpose'].include?('buildd')
25     purp += ", the Debian "
26     if nodeinfo['ldap'][0].has_key?('architecture')
27       purp += nodeinfo['ldap'][0]['architecture'][0]
28     end
29     purp += " build daemon\n"
30   elsif nodeinfo['ldap'][0]['purpose'].include?('porterbox')
31     purp += ", the Debian "
32     if nodeinfo['ldap'][0].has_key?('architecture')
33       purp += nodeinfo['ldap'][0]['architecture'][0]
34     end
35     purp += " porterbox\n"
36   else
37     purp += ", used for the following services:\n"
38     nodeinfo['ldap'][0]['purpose'].sort.each do |l|
39       if l =~ /\[\[(\*|-)?(.*?)\]\]/
40         l = $2
41       end
42       if l =~ /\[\[(.*?)\|(.*?)\]\]/
43         l = $2
44       end
45       purp += "\t" + l + "\n"
46     end
47   end
48 else
49   purp += "\n"
50 end
51
52 if nodeinfo.has_key?('footer')
53   purp += "\n" + nodeinfo['footer'] + "\n"
54 end
55 purp
56 -%>
57
58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59