summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/network.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 79d4d90a7..89deb2793 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -175,7 +175,7 @@ sub add2hosts {
my %l = map { if_(/^\s*(\S+)(.*)/, $1 => $2) }
grep { !/\s\Q$hostname$sub_hostname\E(\s|$)/ } cat_($file);
- $l{$_} = "\t\t$hostname$sub_hostname" foreach grep { $_ } @ips;
+ $l{$_} .= ($l{$_} ? " " : "\t\t") . "$hostname$sub_hostname" foreach grep { $_ } @ips;
log::explanations("writing host information to $file");
output($file, map { "$_$l{$_}\n" } keys %l);