From 99c9b0680ce235c7e5bb6d18a8154a147e70947c Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 28 Sep 1999 15:53:43 +0000 Subject: *** empty log message *** --- perl-install/network.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'perl-install/network.pm') diff --git a/perl-install/network.pm b/perl-install/network.pm index 9c7c325c8..31fcd7e0f 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -22,6 +22,21 @@ sub read_conf { \%netc; } +sub read_resolv_conf { + my ($file) = @_; + my %netc; + my @l; + + local *F; + open F, $file or die "cannot open $file: $!"; + foreach () { + push @l, $1 if (/^\s*nameserver\s+([^\s]+)/); + } + + $netc{$_} = shift @l foreach qw(dnsServer dnsServer2 dnsServer3); + \%netc; +} + sub read_interface_conf { my ($file) = @_; my %intf = getVarsFromSh($file) or die "cannot open file $file: $!"; -- cgit v1.2.1