diff options
author | Olivier Blin <blino@mageia.org> | 2011-11-21 23:57:01 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2011-11-21 23:57:01 +0000 |
commit | eef97e87b4ba6391efeaea28f7c302bfa724e927 (patch) | |
tree | 8b2e774108e6b603c5cf8e98e0a31075a3fc01b8 /lib | |
parent | a72c69c3e01d36365eab1742652382089e960609 (diff) | |
download | drakx-net-eef97e87b4ba6391efeaea28f7c302bfa724e927.tar drakx-net-eef97e87b4ba6391efeaea28f7c302bfa724e927.tar.gz drakx-net-eef97e87b4ba6391efeaea28f7c302bfa724e927.tar.bz2 drakx-net-eef97e87b4ba6391efeaea28f7c302bfa724e927.tar.xz drakx-net-eef97e87b4ba6391efeaea28f7c302bfa724e927.zip |
fix parsing (and thus writing back) ACCOUNTING and NM_CONTROLLED in ifcfg
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection.pm | 4 | ||||
-rw-r--r-- | lib/network/connection/ethernet.pm | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm index 837ab97..88953f1 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -149,8 +149,8 @@ sub load_interface_settings { $self->{control}{userctl} = $self->get_ifcfg_bool('USERCTL'); $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}; + $self->{control}{accounting} = $self->get_ifcfg_bool('ACCOUNTING'); + $self->{control}{nm_controlled} = $self->get_ifcfg_bool('NM_CONTROLLED'); $self->{control}{uuid} = $self->{ifcfg}{UUID}; $self->{control}{name} = $self->{ifcfg}{NAME}; $self->{control}{last_connect} = $self->{ifcfg}{LAST_CONNECT}; diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 7b76396..1aabbba 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -18,6 +18,7 @@ sub get_devices() { require detect_devices; my @devices = detect_devices::probe_category('network/main|gigabit|pcmcia|tokenring|usb|firewire'); my @lan = grep { detect_devices::is_lan_interface($_) && !detect_devices::is_wireless_interface($_) } detect_devices::get_all_net_devices(); + use Data::Dumper; print Dumper(\@devices); @devices, get_unlisted_devices(\@lan, \@devices); } |