diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-24 12:27:32 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-24 12:27:32 +0000 |
commit | a89eac685f68b79d900f4592095d8e8b04afcd1a (patch) | |
tree | e0b64dbcc8410ebfd70a24942fef72488ee710ac /perl-install/network | |
parent | c4aec3e5c773bac11466c3f0b57e40ba82638f3a (diff) | |
download | drakx-a89eac685f68b79d900f4592095d8e8b04afcd1a.tar drakx-a89eac685f68b79d900f4592095d8e8b04afcd1a.tar.gz drakx-a89eac685f68b79d900f4592095d8e8b04afcd1a.tar.bz2 drakx-a89eac685f68b79d900f4592095d8e8b04afcd1a.tar.xz drakx-a89eac685f68b79d900f4592095d8e8b04afcd1a.zip |
(add2hosts) regexp fixes
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/network.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 058a0679c..79d4d90a7 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -172,8 +172,8 @@ sub add2hosts { my ($file, $hostname, @ips) = @_; my $sub_hostname = $hostname =~ /(.*?)\./ ? " $1" : ''; - my %l = map { if_(/\s*(\S+)(.*)/, $1 => $2) } - grep { !/\s+\Q$hostname$sub_hostname\E\s*$/ } cat_($file); + 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; |