From 9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 24 Aug 2004 14:12:59 +0000 Subject: (add2hosts) use difference2 --- perl-install/network/network.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install') 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; -- cgit v1.2.1