summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index 5cab3ac..443c0e4 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -269,7 +269,8 @@ sub build_ifcfg_settings {
DEVICE => $self->get_interface,
ONBOOT => bool2yesno($self->{control}{onboot}),
ACCOUNTING => bool2yesno($self->{control}{accounting}),
- NM_CONTROLLED => bool2yesno($self->{control}{nm_controlled}),
+ # Only write NM_CONTROLLED if we absolutely know it's value
+ if_(defined $self->{control}{nm_controlled}, NM_CONTROLLED => bool2yesno($self->{control}{nm_controlled})),
USERCTL => bool2yesno($self->{control}{userctl}),
METRIC => $self->{control}{metric},
MTU => $self->{control}{mtu},