diff options
author | Frederic Lepied <flepied@mandriva.com> | 2003-02-27 16:01:12 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2003-02-27 16:01:12 +0000 |
commit | e376575fd70be36dbdd5cb909d3e8f1e39968a6d (patch) | |
tree | 448cb76ebf21bac719db7d6604b6c997fd89effb /perl-install | |
parent | 242444e6f0d888e16d979a859fd4e13c468abfe4 (diff) | |
download | drakx-backup-do-not-use-e376575fd70be36dbdd5cb909d3e8f1e39968a6d.tar drakx-backup-do-not-use-e376575fd70be36dbdd5cb909d3e8f1e39968a6d.tar.gz drakx-backup-do-not-use-e376575fd70be36dbdd5cb909d3e8f1e39968a6d.tar.bz2 drakx-backup-do-not-use-e376575fd70be36dbdd5cb909d3e8f1e39968a6d.tar.xz drakx-backup-do-not-use-e376575fd70be36dbdd5cb909d3e8f1e39968a6d.zip |
corrected HOSTNAME management
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/network.pm | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 9649917fc..214330ca5 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -97,14 +97,9 @@ sub write_conf { if ($netc->{HOSTNAME} && $netc->{HOSTNAME} =~ /\.(.+)$/) { $netc->{DOMAINNAME} = $1; } - $netc->{DOMAINNAME} ||= 'localdomain'; - add2hash($netc, { - NETWORKING => "yes", - FORWARD_IPV4 => "false", - if_(!$netc->{DHCP}, HOSTNAME => "localhost.$netc->{DOMAINNAME}"), - }); + $netc->{NETWORKING} = 'yes'; - setVarsInSh($file, $netc, if_(!$netc->{DHCP}, qw(HOSTNAME)), qw(NETWORKING FORWARD_IPV4 GATEWAY GATEWAYDEV NISDOMAIN)); + setVarsInSh($file, $netc, if_(!$netc->{DHCP}, qw(HOSTNAME)), qw(NETWORKING GATEWAY GATEWAYDEV NISDOMAIN)); } sub write_zeroconf { @@ -116,7 +111,7 @@ sub write_resolv_conf { my ($file, $netc) = @_; my %new = ( - search => [ grep { $_ } uniq(@$netc{'DOMAINNAME', 'DOMAINNAME2'}) ], + search => [ grep { $_ } uniq(@$netc{'DOMAINNAME', 'DOMAINNAME2', 'DOMAINNAME3'}) ], nameserver => [ grep { $_ } uniq(@$netc{'dnsServer', 'dnsServer2', 'dnsServer3'}) ], ); @@ -477,6 +472,7 @@ sub read_all_conf { if (/ifcfg-(\w+)/ && $1 ne 'lo') { my $intf = findIntf($intf, $1); add2hash($intf, { getVarsFromSh("$prefix/etc/sysconfig/network-scripts/$_") }); + $netc->{HOSTNAME} = $intf->{DHCP_HOSTNAME} if ($intf->{BOOTPROTO} == 'dhcp'); } } $netcnx->{type} or probe_netcnx_type($prefix, $netc, $intf, $netcnx); @@ -512,8 +508,6 @@ sub easy_dhcp { put_in_hash($netc, { NETWORKING => "yes", - FORWARD_IPV4 => "false", - DOMAINNAME => "localdomain", DHCP => "yes", }); 1; @@ -558,7 +552,7 @@ sub configureNetwork2 { $in->do_pkgs->install(qw(zcip tmdns)); $netc->{ZEROCONF_HOSTNAME} and write_zeroconf("$etc/tmdns.conf", $netc->{ZEROCONF_HOSTNAME}); any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); - + proxy_configure($::o->{miscellaneous}); } |