diff options
author | Colin Guthrie <colin@mageia.org> | 2014-01-27 16:21:26 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2014-01-27 16:25:10 +0000 |
commit | 2419e89ee2ac271e035e2ee8442e56ccf2e7d312 (patch) | |
tree | 4278fc8ef3dd3fbaa5fcb08c06cb529118beed02 /lib/network/connection.pm | |
parent | 81c4c24c36195d3d5b6ee03d57bfdbc7a38ab9e0 (diff) | |
download | drakx-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/connection.pm')
-rw-r--r-- | lib/network/connection.pm | 2 |
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}, |