diff options
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r-- | perl-install/network/network.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 61828cdec..e8575c320 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -57,6 +57,7 @@ sub up_it { run_program::rooted($prefix, "/etc/rc.d/init.d/network", "start"); $_->{isUp} = 1 foreach values %$intfs; } + sub down_it { my ($prefix, $intfs) = @_; run_program::rooted($prefix, "/etc/rc.d/init.d/network", "stop"); @@ -66,7 +67,11 @@ sub down_it { sub write_conf { my ($file, $netc) = @_; - ($netc->{DOMAINNAME}) ||= 'localdomain'; + if ($netc->{HOSTNAME}) { + $netc->{HOSTNAME} =~ /^[^\.]\.(.*)$/; + $1 and $netc->{DOMAINNAME} = $1; + } + ($netc->{DOMAINNAME}) ||= 'localdomain'; add2hash($netc, { NETWORKING => "yes", FORWARD_IPV4 => "false", |