summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-04-14 17:36:17 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-04-14 17:36:17 +0000
commitd3e34852b8f6646d11c6975cdda70bc39bde0611 (patch)
tree6f792825b2a02be799611e2796d5de5741618435
parent1311c3c0bfc348fd6f772f8009355634857f8f3d (diff)
downloaddrakx-net-d3e34852b8f6646d11c6975cdda70bc39bde0611.tar
drakx-net-d3e34852b8f6646d11c6975cdda70bc39bde0611.tar.gz
drakx-net-d3e34852b8f6646d11c6975cdda70bc39bde0611.tar.bz2
drakx-net-d3e34852b8f6646d11c6975cdda70bc39bde0611.tar.xz
drakx-net-d3e34852b8f6646d11c6975cdda70bc39bde0611.zip
Correctly saving hostname (#49827).
-rw-r--r--NEWS3
-rw-r--r--lib/network/connection.pm5
2 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c807ea2..270d7e1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- connection manager:
+ o correctly saving hostname (#49827).
+
0.74.1:
- connection manager:
o using correct persistent-net-rules udev file during installation (#49156)
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);