From d3e34852b8f6646d11c6975cdda70bc39bde0611 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Tue, 14 Apr 2009 17:36:17 +0000 Subject: Correctly saving hostname (#49827). --- lib/network/connection.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/network/connection.pm') diff --git a/lib/network/connection.pm b/lib/network/connection.pm index d059558..d8ede2d 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -266,7 +266,10 @@ sub write_settings { require network::network; my $file = network::network::get_ifcfg_file($self->get_interface); network::network::write_interface_settings($self->build_ifcfg_settings, $file); - network::network::write_hostname($self->{address}{hostname}) if $self->{address}{hostname}; + if ($self->{address}{hostname}) { + $o_net->{network}{HOSTNAME} = $self->{address}{hostname}; + network::network::write_hostname($self->{address}{hostname}); + } network::network::write_network_conf($o_net) if $o_net; require network::shorewall; network::shorewall::update_interfaces_list($self->get_interface); -- cgit v1.2.1