1 <% if @lsbmajdistrelease >= '7' -%>
7 This device is for authorized users only. All traffic on this device
8 is monitored and will be used as evidence for prosecutions. By using
9 this machine you agree to abide by the Debian Machines Usage Policies
10 <URL:http://www.debian.org/devel/dmup>.
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n ")
20 l = l.gsub(/\[\[(.*?)\|(.*?)\]\]/, '\2')
21 l = l.gsub(/\[\[(\*|-)?(.*?)\]\]/, '\2')
25 if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture')
26 arch = scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0]
32 if scope.lookupvar('site::nodeinfo').has_key?('nameinfo')
33 purp += " " + wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n"
36 ninfo = scope.lookupvar('site::nodeinfo')
38 purp += ' Welcome to ' + fqdn
39 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
40 p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
44 extra += ", the Debian #{arch} build daemon."
46 if p.delete('porterbox') or classes.include?("porterbox")
47 extra += ", the Debian #{arch} porterbox. See\n"+
48 extra += " <URL:http://dsa.debian.org/doc/schroot/> for a brief schroot tutorial."
52 extra += (extra == "") ? ", " : " Also"
53 extra +="used for the following services:\n"
54 scope.lookupvar('site::nodeinfo')['ldap']['purpose'].sort.each do |l|
69 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
70 if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
73 phys_host = 'physical host'
75 purp += wrap(" This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
76 "which is hosted at #{ninfo['hoster']['longname']}."
78 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']
79 purp += wrap(" This server is hosted at #{ninfo['hoster']['longname']}.")
84 scope.lookupvar('site::allnodeinfo').keys.sort.each do |node|
85 if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(fqdn)
90 purp += "\nThe following virtual machines run on this system:\n"
93 if scope.lookupvar('site::allnodeinfo')[node]['purpose']
95 scope.lookupvar('site::allnodeinfo')[node]['purpose'].sort.each do |l|
97 purp += "\t " + l + "\n"
106 if scope.lookupvar('::cluster').to_s != 'undefined'
107 purp += "\n This server is a node in ganeti cluster: "
108 purp += scope.lookupvar('::cluster').to_s + ":\n"
109 purp += "\t" + scope.lookupvar('::cluster_nodes').to_s.split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
111 if @lsbmajdistrelease >= '7'
113 purp += "\tCurrently the master node is $(cat /var/lib/ganeti/ssconf_master_node).\n"
115 #nodes = scope.lookupvar('::cluster_nodes').to_s.split.sort
116 #nodes.each do |node|
117 # purp += "\t" + node + "\n"
119 #nodes.reject{|node| node.eql?(fqdn)}.each do |node|
120 # purp += "\t" + node + "\n"
121 # scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
122 # purp += "\t\t" + ip + "\n"
128 if classes.include?("porterbox")
129 purp += "\n " + wrap("Disk space on porter boxes is often limited. Please
130 respect your fellow porters by cleaning up after yourself by deleting
131 schroots and source/build trees in your $HOME, as soon as feasible. DSA
132 reserves the right to recover disk space as necessary.") + "\n"
135 if ninfo['not-bacula-client'] then
136 purp += "\n " + wrap("Note that this host is _NOT_ being backed up. If you
137 care about your data, run your own backups.")
140 if scope.lookupvar('site::nodeinfo').has_key?('footer')
141 purp += "\n" + wrap(scope.lookupvar('site::nodeinfo')['footer'])
147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149 <% if @lsbmajdistrelease >= '7' -%>
154 # vim:set sts=2 ts=2:
155 # vim:set shiftwidth=2: