summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-26 13:03:17 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-26 13:03:17 +0000
commitd7ab4699c74fabe8653afe6db174cfff0c33431e (patch)
treedda2921909dd04fce6f119b0815d1930f42f2407
parent5c6087042343084e25256fd20af00097379c9db4 (diff)
downloaddrakx-d7ab4699c74fabe8653afe6db174cfff0c33431e.tar
drakx-d7ab4699c74fabe8653afe6db174cfff0c33431e.tar.gz
drakx-d7ab4699c74fabe8653afe6db174cfff0c33431e.tar.bz2
drakx-d7ab4699c74fabe8653afe6db174cfff0c33431e.tar.xz
drakx-d7ab4699c74fabe8653afe6db174cfff0c33431e.zip
try to get back DOMAINNAME if needed.
-rw-r--r--perl-install/network/network.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 8ae8abb6a..1c303ab6b 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -82,18 +82,17 @@ sub down_it {
sub write_conf {
my ($file, $netc) = @_;
- if ($netc->{HOSTNAME}) {
- $netc->{HOSTNAME} =~ /\.(.+)$/;
+ if ($netc->{HOSTNAME} && $netc->{HOSTNAME} =~ /\.(.+)$/) {
$netc->{DOMAINNAME} = $1;
}
- ($netc->{DOMAINNAME}) ||= 'localdomain';
+ $netc->{DOMAINNAME} ||= 'localdomain';
add2hash($netc, {
NETWORKING => "yes",
FORWARD_IPV4 => "false",
if_(!$netc->{DHCP}, HOSTNAME => "localhost.$netc->{DOMAINNAME}"),
});
- setVarsInSh($file, $netc, if_(!$netc->{DHCP}, 'HOSTNAME'), qw(NETWORKING FORWARD_IPV4 GATEWAY GATEWAYDEV NISDOMAIN));
+ setVarsInSh($file, $netc, if_(!$netc->{DHCP}, qw(HOSTNAME DOMAINNAME)), qw(NETWORKING FORWARD_IPV4 GATEWAY GATEWAYDEV NISDOMAIN));
}
sub write_zeroconf {