summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-24 14:12:59 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-24 14:12:59 +0000
commit9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176 (patch)
treedcf5cc262ee43026aa8b70b7af7f5d510601c53a /perl-install
parent7a8c1a7d43f8fdb82dc9b487182ecaa31284e3c7 (diff)
downloaddrakx-backup-do-not-use-9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176.tar
drakx-backup-do-not-use-9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176.tar.gz
drakx-backup-do-not-use-9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176.tar.bz2
drakx-backup-do-not-use-9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176.tar.xz
drakx-backup-do-not-use-9f24cd47b24bc69b2607cfcd2a5e39c22f3d8176.zip
(add2hosts) use difference2
Diffstat (limited to 'perl-install')
-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;