summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-01-27 16:21:26 +0000
committerColin Guthrie <colin@mageia.org>2014-01-27 16:25:10 +0000
commit2419e89ee2ac271e035e2ee8442e56ccf2e7d312 (patch)
tree4278fc8ef3dd3fbaa5fcb08c06cb529118beed02 /lib/network
parent81c4c24c36195d3d5b6ee03d57bfdbc7a38ab9e0 (diff)
downloaddrakx-net-2419e89ee2ac271e035e2ee8442e56ccf2e7d312.tar
drakx-net-2419e89ee2ac271e035e2ee8442e56ccf2e7d312.tar.gz
drakx-net-2419e89ee2ac271e035e2ee8442e56ccf2e7d312.tar.bz2
drakx-net-2419e89ee2ac271e035e2ee8442e56ccf2e7d312.tar.xz
drakx-net-2419e89ee2ac271e035e2ee8442e56ccf2e7d312.zip
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.
Diffstat (limited to 'lib/network')
-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 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},