From d345f0125f2d6da02eab49a890c781c889d17e8c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 24 Aug 2004 12:27:57 +0000 Subject: (add2hosts) allow multiple aliases per host --- perl-install/network/network.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/network') 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); -- cgit v1.2.1