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 ")
17 s.split("\n").map{ |x|
18 if (x.length > width) then
19 #x.gsub!(/(.{1,#{width}}) +(?=\S)/, "\\1\n ")
20 x.gsub!(/(.{1,#{width}})( +|\Z)/, "\\1\n ")
27 l = l.gsub(/\[\[(.*?)\|(.*?)\]\]/, '\2')
28 l = l.gsub(/\[\[(\*|-)?(.*?)\]\]/, '\2')
32 if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture')
33 arch = scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0]
39 if scope.lookupvar('site::nodeinfo').has_key?('nameinfo')
40 purp += " " + wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n"
43 ninfo = scope.lookupvar('site::nodeinfo')
45 extra = 'Welcome to ' + fqdn
46 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
47 p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
51 entries += ", the Debian #{arch} build daemon"
53 if p.delete('porterbox') or classes.include?("porterbox")
54 entries += ", the Debian #{arch} porterbox"
58 entries += (entries == "") ? ", " : ". Also"
59 entries +="used for the following services:\n"
60 scope.lookupvar('site::nodeinfo')['ldap']['purpose'].sort.each do |l|
71 purp += " " + wrap(extra) + "\n"
73 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
74 if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
77 phys_host = 'physical host'
79 purp += wrap(" This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
80 "which is hosted at #{ninfo['hoster']['longname']}."
82 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']
83 purp += wrap(" This server is hosted at #{ninfo['hoster']['longname']}.")
88 scope.lookupvar('site::allnodeinfo').keys.sort.each do |node|
89 if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(fqdn)
94 purp += "\nThe following virtual machines run on this system:\n"
97 if scope.lookupvar('site::allnodeinfo')[node]['purpose']
99 scope.lookupvar('site::allnodeinfo')[node]['purpose'].sort.each do |l|
101 purp += "\t " + l + "\n"
110 if scope.lookupvar('::cluster').to_s != 'undefined'
111 purp += "\n This server is a node in ganeti cluster: "
112 purp += scope.lookupvar('::cluster').to_s + ":\n"
113 purp += "\t" + scope.lookupvar('::cluster_nodes').to_s.split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
115 if @lsbmajdistrelease >= '7'
117 purp += "\tCurrently the master node is $(cat /var/lib/ganeti/ssconf_master_node).\n"
119 #nodes = scope.lookupvar('::cluster_nodes').to_s.split.sort
120 #nodes.each do |node|
121 # purp += "\t" + node + "\n"
123 #nodes.reject{|node| node.eql?(fqdn)}.each do |node|
124 # purp += "\t" + node + "\n"
125 # scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
126 # purp += "\t\t" + ip + "\n"
132 if classes.include?("porterbox")
133 purp += "\n " + wrap("Disk space on porter boxes is often limited. Please respect your fellow porters by cleaning up after yourself and deleting schroots and source/build trees in your ~ as soon as feasible. DSA reserves the right to recover disk space as necessary. See <URL:http://dsa.debian.org/doc/schroot/> for a brief tutorial on using schroot.")
136 if ninfo['not-bacula-client'] then
137 purp += "\n " + wrap("Note that this host is _NOT_ being backed up. If you 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'])
146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148 <% if @lsbmajdistrelease >= '7' -%>
153 # vim:set sts=2 ts=2:
154 # vim:set shiftwidth=2: