summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-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 {