From a9fd38a43f8d880801afa6533184e437725049e8 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 30 Sep 2012 17:28:46 +0100 Subject: [PATCH] make motd a little nicer Signed-off-by: Stephen Gran --- modules/motd/templates/motd.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index 2430bb1dd..e18d58ce3 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -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'] -- 2.20.1