From ac5d1ea242c0d8554b3ea6517c2697d78b17667d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Thu, 21 May 2020 09:21:40 +0100 Subject: [PATCH] Revert "Import correctly hosts entries" This reverts commit cfd95bc9a73b011ff4e428ec4eb8188feb2c5581. --- src/modules/Host.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/Host.rb b/src/modules/Host.rb index 758bfd3ac..b44051e41 100644 --- a/src/modules/Host.rb +++ b/src/modules/Host.rb @@ -145,9 +145,11 @@ def Import(settings) imported_hosts = settings.fetch("hosts", {}) # convert from old format to the new one - imported_hosts.each_pair do |k, v| - names = v.join(" ") - imported_hosts[k] = names.empty? ? [] : [names] + # use ::1 entry as a reference + if (imported_hosts["::1"] || []).size > 1 + imported_hosts.each_pair do |k, v| + imported_hosts[k] = [v.join(" ")] + end end imported_hosts.each_pair do |ip, names|