diff options
author | damien <damien@mandriva.com> | 2000-09-14 18:18:57 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-09-14 18:18:57 +0000 |
commit | 7d50f4e56edc1d5f20ee159122cbe0871047e70e (patch) | |
tree | 3c47b23f47ce88ae36276616c2d084cc2f605446 /perl-install | |
parent | 203ff6c2a9b581edb0db8fc3c40cedc94fd9f017 (diff) | |
download | drakx-7d50f4e56edc1d5f20ee159122cbe0871047e70e.tar drakx-7d50f4e56edc1d5f20ee159122cbe0871047e70e.tar.gz drakx-7d50f4e56edc1d5f20ee159122cbe0871047e70e.tar.bz2 drakx-7d50f4e56edc1d5f20ee159122cbe0871047e70e.tar.xz drakx-7d50f4e56edc1d5f20ee159122cbe0871047e70e.zip |
updated
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm index 4d4db13d8..a98dce762 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -80,7 +80,7 @@ sub write_resolv_conf { #- get the list of used dns. my %used_dns; @used_dns{$netc->{dnsServer}, $netc->{dnsServer2}, $netc->{dnsServer3}} = (1, 2, 3); - unless ($netc->{DOMAINNAME} || keys %used_dns > 0) { + unless ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2} || keys %used_dns > 0) { unlink($file); log::l("neither domain name nor dns server are configured"); return 0; @@ -95,8 +95,8 @@ sub write_resolv_conf { } close F; open F, ">$file" or die "cannot write $file: $!"; - print F "# search $_\n" foreach grep { $_ ne $netc->{DOMAINNAME} } sort { $search{$a} <=> $search{$b} } keys %search; - print F "search $netc->{DOMAINNAME}\n\n" if $netc->{DOMAINNAME}; + print F "# search $_\n" foreach grep { $_ ne "$netc->{DOMAINNAME} $netc->{DOMAINNAME2}" } sort { $search{$a} <=> $search{$b} } keys %search; + print F "search $netc->{DOMAINNAME} $netc->{DOMAINNAME2}\n\n" if ($netc->{DOMAINNAME} || $netc->{DOMAINNAME2}); print F "# nameserver $_\n" foreach grep { ! exists $used_dns{$_} } sort { $dns{$a} <=> $dns{$b} } keys %dns; print F "nameserver $_\n" foreach sort { $used_dns{$a} <=> $used_dns{$b} } grep { $_ } keys %used_dns; print F "\n"; @@ -369,7 +369,7 @@ sub configureNetwork2 { add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf); sethostname($netc) unless $::testing; addDefaultRoute($netc) unless $::testing; - + grep { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf and $install && $install->('dhcpcd'); grep { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $install && $install->('pump'); #-res_init(); #- reinit the resolver so DNS changes take affect |