summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-02-03 19:54:25 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-02-03 19:54:25 +0000
commit7096fbc06b683bcd05f50e01e3f3af7b4418fed4 (patch)
tree73a469839c0217679ee219cbf16b087e89d1172b /lib
parent901b8f51b22aec08bc91921276d721387809207f (diff)
downloaddrakx-net-7096fbc06b683bcd05f50e01e3f3af7b4418fed4.tar
drakx-net-7096fbc06b683bcd05f50e01e3f3af7b4418fed4.tar.gz
drakx-net-7096fbc06b683bcd05f50e01e3f3af7b4418fed4.tar.bz2
drakx-net-7096fbc06b683bcd05f50e01e3f3af7b4418fed4.tar.xz
drakx-net-7096fbc06b683bcd05f50e01e3f3af7b4418fed4.zip
Allow interface to be controlled by NetworkManager
Merge mdv commit 271832
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection.pm3
-rw-r--r--lib/network/network.pm1
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index 09039df..dd784b6 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -150,6 +150,7 @@ sub load_interface_settings {
$self->{control}{metric} = $self->{ifcfg}{METRIC};
$self->{control}{mtu} = $self->{ifcfg}{MTU};
$self->{control}{accounting} = $self->{ifcfg}{ACCOUNTING};
+ $self->{control}{nm_controlled} = $self->{ifcfg}{NM_CONTROLLED};
}
#- override to return 1 if the connection network scan is slow
@@ -243,6 +244,7 @@ sub get_control_settings {
{ text => N("Allow users to manage the connection"), val => \$self->{control}{userctl}, type => "bool" },
{ text => N("Start the connection at boot"), val => \$self->{control}{onboot}, type => "bool" },
{ text => N("Enable traffic accounting"), val => \$self->{control}{accounting}, type => "bool" },
+ { text => N("Allow interface to be controlled by Network Manager"), val => \$self->{control}{nm_controlled}, type => "bool" },
{ label => N("Metric"), val => \$self->{control}{metric}, advanced => 1 },
{ label => N("MTU"), val => \$self->{control}{mtu}, advanced => 1,
help => N("Maximum size of network message (MTU). If unsure, left blank.") },
@@ -255,6 +257,7 @@ 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}),
USERCTL => bool2yesno($self->{control}{userctl}),
METRIC => $self->{control}{metric},
MTU => $self->{control}{mtu},
diff --git a/lib/network/network.pm b/lib/network/network.pm
index 77e7e4c..2ff65be 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -192,6 +192,7 @@ sub write_interface_settings {
qw(DISCONNECTTIMEOUT PERSIST DEFROUTE),
qw(VPN_NAME VPN_TYPE),
qw(ACCOUNTING),
+ qw(NM_CONTROLLED),
qw(CELLULAR_CID),
if_($intf->{BOOTPROTO} eq "dhcp", qw(DHCP_CLIENT DHCP_HOSTNAME NEEDHOSTNAME PEERDNS PEERYP PEERNTPD DHCP_TIMEOUT)),
if_($intf->{DEVICE} =~ /^ippp\d+$/, qw(DIAL_ON_IFUP))