summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/network.pm')
-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 8f1898423..7be0aa698 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -175,7 +175,7 @@ sub add2hosts {
my %l;
foreach (cat_($file)) {
my ($ip, $aliases) = /^\s*(\S+)\s+(\S+.*)$/ or next;
- push @{$l{$ip}}, grep { !member($_, $hostname, $sub_hostname) } split /\s+/, $aliases;
+ push @{$l{$ip}}, difference2([ split /\s+/, $aliases ], [ $hostname, $sub_hostname ]);
} cat_($file);
push @{$l{$_}}, $hostname, if_($sub_hostname, $sub_hostname) foreach grep { $_ } @ips;