From cfaae9807d15e6aa22801f443792f5a16afbf0be Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 15 Apr 2009 14:05:00 +0000 Subject: do not crash if no o_net is passed --- lib/network/connection.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/network/connection.pm') 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; -- cgit v1.2.1