From b257d8b21426a653d1afae4578fcd826412def6b Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 13 Sep 2019 13:20:54 +0200 Subject: [PATCH] Try to avoid reserved site keyword; s///g would have been a good idea --- modules/exim/templates/manualroute.erb | 2 +- modules/motd/templates/motd.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/exim/templates/manualroute.erb b/modules/exim/templates/manualroute.erb index 2965913f3..c7ce96c1e 100644 --- a/modules/exim/templates/manualroute.erb +++ b/modules/exim/templates/manualroute.erb @@ -28,7 +28,7 @@ scope.lookupvar('deprecated::allnodeinfo').keys.sort.each do |host| mxmatch = mxregex.match(mx) if mxmatches.include?(mxmatch[1]) route = host + ":\t\t" + host - if scope.lookupvar('deprecated::localinfo').has_key?(host) and scope.lookupvar('site::localinfo')[host].has_key?('mail_port') and scope.lookupvar('site::localinfo')[host]['mail_port'].to_s != '' + if scope.lookupvar('deprecated::localinfo').has_key?(host) and scope.lookupvar('deprecated::localinfo')[host].has_key?('mail_port') and scope.lookupvar('deprecated::localinfo')[host]['mail_port'].to_s != '' route += "::" + scope.lookupvar('deprecated::localinfo')[host]['mail_port'].to_s end routes << route diff --git a/modules/motd/templates/motd.erb b/modules/motd/templates/motd.erb index e0c0b82a3..573ad8880 100644 --- a/modules/motd/templates/motd.erb +++ b/modules/motd/templates/motd.erb @@ -88,7 +88,7 @@ end vms = [] scope.lookupvar('deprecated::allnodeinfo').keys.sort.each do |node| - if scope.lookupvar('deprecated::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(@fqdn) + if scope.lookupvar('deprecated::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('deprecated::allnodeinfo')[node]['physicalHost'].include?(@fqdn) vms << node end end -- 2.20.1