summaryrefslogtreecommitdiffstats
path: root/lib/network/connection.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-04-15 14:05:00 +0000
committerOlivier Blin <oblin@mandriva.com>2009-04-15 14:05:00 +0000
commitcfaae9807d15e6aa22801f443792f5a16afbf0be (patch)
tree2bcfac5aa2f857642b8ef592910768dc335c1259 /lib/network/connection.pm
parent8ae227159b636872798cf420a94c1419d80d186c (diff)
downloaddrakx-net-cfaae9807d15e6aa22801f443792f5a16afbf0be.tar
drakx-net-cfaae9807d15e6aa22801f443792f5a16afbf0be.tar.gz
drakx-net-cfaae9807d15e6aa22801f443792f5a16afbf0be.tar.bz2
drakx-net-cfaae9807d15e6aa22801f443792f5a16afbf0be.tar.xz
drakx-net-cfaae9807d15e6aa22801f443792f5a16afbf0be.zip
do not crash if no o_net is passed
Diffstat (limited to 'lib/network/connection.pm')
-rw-r--r--lib/network/connection.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index d8ede2d..98e94da 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -267,7 +267,7 @@ sub write_settings {
my $file = network::network::get_ifcfg_file($self->get_interface);
network::network::write_interface_settings($self->build_ifcfg_settings, $file);
if ($self->{address}{hostname}) {
- $o_net->{network}{HOSTNAME} = $self->{address}{hostname};
+ $o_net->{network}{HOSTNAME} = $self->{address}{hostname} if $o_net;
network::network::write_hostname($self->{address}{hostname});
}
network::network::write_network_conf($o_net) if $o_net;