make motd a little nicer
authorStephen Gran <steve@lobefin.net>
Sun, 30 Sep 2012 16:28:46 +0000 (17:28 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 30 Sep 2012 16:28:46 +0000 (17:28 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/motd/templates/motd.erb

index 2430bb1..e18d58c 100644 (file)
@@ -69,7 +69,12 @@ end
 purp += "\n"
 
 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
-  purp += wrap("This virtual server runs on the physical host #{ninfo['ldap']['physicalHost'][0]}, " +
+  if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
+    phys_host = 'cluster'
+  else
+    phys_host = 'physical host'
+  end
+  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']