diff options
author | Francois Pons <fpons@mandriva.com> | 1999-09-28 15:53:43 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 1999-09-28 15:53:43 +0000 |
commit | 99c9b0680ce235c7e5bb6d18a8154a147e70947c (patch) | |
tree | e42f58e16872cdf6f4030936f9050ebc5bb99b20 /perl-install/network.pm | |
parent | 4d1e2e9740a607609d497adf72dbef43e9f1a4c8 (diff) | |
download | drakx-backup-do-not-use-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar drakx-backup-do-not-use-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.gz drakx-backup-do-not-use-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.bz2 drakx-backup-do-not-use-99c9b0680ce235c7e5bb6d18a8154a147e70947c.tar.xz drakx-backup-do-not-use-99c9b0680ce235c7e5bb6d18a8154a147e70947c.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r-- | perl-install/network.pm | 15 |
1 files changed, 15 insertions, 0 deletions
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 (<F>) { + 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: $!"; |