summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-24 12:27:57 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-24 12:27:57 +0000
commitd345f0125f2d6da02eab49a890c781c889d17e8c (patch)
tree85e717a6c31a8ee9359347cc06fb644c42843076 /perl-install/network
parenta89eac685f68b79d900f4592095d8e8b04afcd1a (diff)
downloaddrakx-d345f0125f2d6da02eab49a890c781c889d17e8c.tar
drakx-d345f0125f2d6da02eab49a890c781c889d17e8c.tar.gz
drakx-d345f0125f2d6da02eab49a890c781c889d17e8c.tar.bz2
drakx-d345f0125f2d6da02eab49a890c781c889d17e8c.tar.xz
drakx-d345f0125f2d6da02eab49a890c781c889d17e8c.zip
(add2hosts) allow multiple aliases per host
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);