From 2d5047464d25dff02f548fd6fbc8c44a0848fc25 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 5 Apr 2012 12:31:48 +0100 Subject: [PATCH] hope this works Signed-off-by: Stephen Gran --- modules/motd/templates/motd.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index 47eb95213..6beeadd3b 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -22,6 +22,8 @@ if scope.lookupvar('site::nodeinfo').has_key?('nameinfo') purp += wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n\n" end +ninfo = scope.lookupvar('site::nodeinfo') + purp += 'Welcome to ' + fqdn if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose')) p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone() @@ -44,7 +46,7 @@ if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose')) extra += "\n" extra += "See 'dchroot -l' or 'schroot -l' for a list of available chroots.\n" if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('admin') - extra += "Please contact #{nodeinfo['ldap']['admin'][0]} for install requests,\n" + extra += "Please contact #{ninfo['ldap']['admin'][0]} for install requests,\n" extra += "following the recommendations in .\n" end end @@ -67,11 +69,11 @@ end purp += "\n" if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost')) - purp += wrap("This virtual server runs on the physical host #{nodeinfo['ldap']['physicalHost'][0]}, " + - "which is hosted at #{nodeinfo['hoster']['longname']}." + purp += wrap("This virtual server runs on the physical 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 #{nodeinfo['hoster']['longname']}.") + purp += wrap("This server is hosted at #{ninfo['hoster']['longname']}.") end -- 2.20.1