From 2419e89ee2ac271e035e2ee8442e56ccf2e7d312 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 27 Jan 2014 16:21:26 +0000 Subject: Fix 'automatic' setting for network manager. It seems to come through as a string here and is thus 'defined' so passes the check and as a string it equates to true/yes. This just adds a simple fix for this, as it's beyond my perl-fu. More eleqant fixes welcome. --- lib/network/connection.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/network/connection.pm b/lib/network/connection.pm index e705496..495cfd1 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -278,7 +278,7 @@ sub build_ifcfg_settings { ONBOOT => bool2yesno($self->{control}{onboot}), ACCOUNTING => bool2yesno($self->{control}{accounting}), # Only write NM_CONTROLLED if we absolutely know it's value - if_(defined $self->{control}{nm_controlled}, NM_CONTROLLED => bool2yesno($self->{control}{nm_controlled})), + if_(defined $self->{control}{nm_controlled} && 'undef' ne $self->{control}{nm_controlled}, NM_CONTROLLED => bool2yesno($self->{control}{nm_controlled})), USERCTL => bool2yesno($self->{control}{userctl}), METRIC => $self->{control}{metric}, MTU => $self->{control}{mtu}, -- cgit v1.2.1