diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-02-19 20:10:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-02-19 20:10:45 +0000 |
commit | 0837656285fb42a851f756af645e3d2666a5546a (patch) | |
tree | 37ee1321f2e5e4ddd8e733c7bda40d9f665190ef /lib/network/connection.pm | |
parent | 9dee9f1f94882f4dcad0b2d33f0bce9f3ec623a6 (diff) | |
download | drakx-net-0837656285fb42a851f756af645e3d2666a5546a.tar drakx-net-0837656285fb42a851f756af645e3d2666a5546a.tar.gz drakx-net-0837656285fb42a851f756af645e3d2666a5546a.tar.bz2 drakx-net-0837656285fb42a851f756af645e3d2666a5546a.tar.xz drakx-net-0837656285fb42a851f756af645e3d2666a5546a.zip |
add support for MACADDR and ETHTOOL_OPTS (Oden Eriksson, mga#8811)
Diffstat (limited to 'lib/network/connection.pm')
-rw-r--r-- | lib/network/connection.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm index c0c39a9..c92eb87 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -148,6 +148,9 @@ 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}{macaddr} = $self->{ifcfg}{MACADDR}; + $self->{control}{hwaddr} = $self->{ifcfg}{HWADDR}; + $self->{control}{ethtool_opts} = $self->{ifcfg}{ETHTOOL_OPTS}; $self->{control}{accounting} = $self->get_ifcfg_bool('ACCOUNTING'); $self->{control}{nm_controlled} = $self->get_ifcfg_bool('NM_CONTROLLED'); $self->{control}{uuid} = $self->{ifcfg}{UUID}; @@ -250,6 +253,12 @@ sub get_control_settings { { 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.") }, + { label => N("MACADDR"), val => \$self->{control}{macaddr}, advanced => 1, + help => N("Use a fake MAC address. If unset, uses HWADDR or default.") }, + { label => N("HWADDR"), val => \$self->{control}{hwaddr}, advanced => 1, + help => N("Set the MAC address. If unset, uses default.") }, + { label => N("ETHTOOL_OPTS"), val => \$self->{control}{ethtool_opts}, advanced => 1, + help => N("Use ethtool to pass options to the NIC. eg. \"autoneg off wol g\"") }, ]; } @@ -263,6 +272,9 @@ sub build_ifcfg_settings { USERCTL => bool2yesno($self->{control}{userctl}), METRIC => $self->{control}{metric}, MTU => $self->{control}{mtu}, + MACADDR => $self->{control}{macaddr}, + HWADDR => $self->{control}{hwaddr}, + ETHTOOL_OPTS => $self->{control}{ethtool_opts}, UUID => $self->{control}{uuid}, NAME => $self->{control}{name}, LAST_CONNECT => $self->{control}{last_connect}, |