summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-09 03:27:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-09 03:27:13 +0000
commit306bd13f549bf0800d76a6c5b9efee1d7c447b6a (patch)
tree2bdd5c43c9e84b8e627ab26ea5050ef353f7b51f /perl-install/network/network.pm
parent8828cad40309af00a289a234c162554b382f0fba (diff)
downloaddrakx-306bd13f549bf0800d76a6c5b9efee1d7c447b6a.tar
drakx-306bd13f549bf0800d76a6c5b9efee1d7c447b6a.tar.gz
drakx-306bd13f549bf0800d76a6c5b9efee1d7c447b6a.tar.bz2
drakx-306bd13f549bf0800d76a6c5b9efee1d7c447b6a.tar.xz
drakx-306bd13f549bf0800d76a6c5b9efee1d7c447b6a.zip
perl_checker prototype compliance
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 83e6d15a4..9b7a67eb3 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -27,15 +27,15 @@ sub read_conf {
}
sub read_resolv_conf_raw {
- my ($file) = @_;
- $file ||= "$::prefix/etc/resolv.conf";
- { nameserver => [ cat_($file) =~ /^\s*nameserver\s+(\S+)/mg ],
- search => [ if_(cat_($file) =~ /^\s*search\s+(.*)/m, split(' ', $1)) ] };
+ my ($o_file) = @_;
+ my $s = cat_($o_file || "$::prefix/etc/resolv.conf");
+ { nameserver => [ $s =~ /^\s*nameserver\s+(\S+)/mg ],
+ search => [ if_($s =~ /^\s*search\s+(.*)/m, split(' ', $1)) ] };
}
sub read_resolv_conf {
- my ($file) = @_;
- my $resolv_conf = read_resolv_conf_raw($file);
+ my ($o_file) = @_;
+ my $resolv_conf = read_resolv_conf_raw($o_file);
+{
(mapn { $_[0] => $_[1] } [ qw(dnsServer dnsServer2 dnsServer3) ], $resolv_conf->{nameserver}),
(mapn { $_[0] => $_[1] } [ qw(DOMAINNAME DOMAINNAME2 DOMAINNAME3) ], $resolv_conf->{search}),