]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/motd/templates/motd.erb
spacing
[dsa-puppet.git] / modules / motd / templates / motd.erb
index 7f774d1777e983070ffe29a03fe245e410912974..b371a901a86bdc1eb2d9e9e471f641a97a61a3a5 100644 (file)
@@ -24,12 +24,12 @@ end
 
 purp = ''
 if scope.lookupvar('site::nodeinfo').has_key?('nameinfo')
-  purp += wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n\n"
+  purp += " " + wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n"
 end
 
 ninfo = scope.lookupvar('site::nodeinfo')
 
-purp += 'Welcome to ' + fqdn
+purp += ' Welcome to ' + fqdn
 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
   p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
   extra = ''
@@ -50,13 +50,8 @@ if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
     purp += " porterbox"
     extra += "\n"
     if classes.include?("porterbox")
-      extra += "See 'schroot -l' for a list of available chroots.  Start new sessions\n"
-      extra += "with 'schroot --begin-session -c <chroot>', run commands in sessions using\n"
-      extra += "'schroot --run-session -c <session> [-- command]', and tear down sessions\n"
-      extra += "using 'schroot --end-session -c <session>'.  You can run a limited set of\n"
-      extra += "privileged commands, for instance some of apt-get, using\n"
-      extra += "'dd-schroot-cmd -c <session> <command>'.\n"
-      extra += "Use 'schroot-list-sessions' to list your open sessions.\n"
+      extra += "For an introduction to the porterbox 'schroot' tool, see:\n"
+      extra += "  <URL:http://dsa.debian.org/doc/schroot/>.\n"
     else
       extra += "See 'dchroot -l' or 'schroot -l' for a list of available chroots.\n"
       if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('admin')
@@ -89,11 +84,11 @@ if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
   else
     phys_host = 'physical host'
   end
-  purp += wrap("This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
+  purp += wrap(" This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
                "which is hosted at #{ninfo['hoster']['longname']}."
                )
 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']
-  purp += wrap("This server is hosted at #{ninfo['hoster']['longname']}.")
+  purp += wrap(" This server is hosted at #{ninfo['hoster']['longname']}.")
 end
 
 
@@ -121,7 +116,7 @@ end
 
 
 if scope.lookupvar('::cluster').to_s != 'undefined'
-  purp += "\nThis server is a node in ganeti cluster: "
+  purp += "\n This server is a node in ganeti cluster: "
   purp += scope.lookupvar('::cluster').to_s + ":\n"
   purp += "\t" + scope.lookupvar('::cluster_nodes').to_s.split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
 
@@ -142,6 +137,18 @@ if scope.lookupvar('::cluster').to_s != 'undefined'
 end
 
 
+if classes.include?("porterbox")
+  purp += "\n Disk space on porter boxes is often limited.  Please respect your fellow\n" +
+           " porters by cleaning up after yourself by deleting schroots and source/build\n" +
+           " trees in your $HOME, as soon as feasible.  DSA reserves the right to recover\n" +
+           " disk space as necessary.\n"
+end
+
+if ninfo['not-bacula-client'] then
+  purp += "\n Note that this host is _NOT_ being backed up.  If you care about your\n" +
+            " data, run your own backups.\n"
+end
+
 if scope.lookupvar('site::nodeinfo').has_key?('footer')
   purp += "\n" + wrap(scope.lookupvar('site::nodeinfo')['footer']) + "\n"
 end