summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-01-05 19:35:38 +0000
committerColin Guthrie <colin@mageia.org>2014-01-05 20:00:31 +0000
commit8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b (patch)
tree90ede68f6c98705fc4e5e59b00b595a7d065f83d
parent500719ec13c52d494b6e17067e81243be83b76f8 (diff)
downloaddrakx-net-8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b.tar
drakx-net-8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b.tar.gz
drakx-net-8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b.tar.bz2
drakx-net-8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b.tar.xz
drakx-net-8859bff312e8b6064b6f1a20f8c5a647bf5e5d2b.zip
Nuke the use of udev rules for network device names
Persistent device names make it no longer relevant. mga#11592
-rw-r--r--NEWS2
-rw-r--r--lib/network/connection/ethernet.pm23
2 files changed, 2 insertions, 23 deletions
diff --git a/NEWS b/NEWS
index c42d539..648547c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
- nuke the use of /etc/iftab (it's no longer useful) mga#11592
+- nuke the use of udev rules for network device names (persistent device names
+ make it no longer relevant) mga#11592
2.7
- adapt to new /etc/sysctl.d
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm
index 9b5a9d4..47056bb 100644
--- a/lib/network/connection/ethernet.pm
+++ b/lib/network/connection/ethernet.pm
@@ -294,8 +294,6 @@ sub write_settings {
}
}
$self->SUPER::write_settings($o_net, $o_modules_conf);
- # update udev configuration
- update_udev_net_config();
}
sub get_status_message {
@@ -491,26 +489,6 @@ sub get_eth_card_mac_address {
`$::prefix/sbin/ip -o link show $intf 2>/dev/null` =~ m|.*link/(\S+)\s((?:[0-9a-f]{2}:?)+)\s|;
}
-sub update_udev_net_config() {
- my $net_name_helper = "/lib/udev/write_net_rules";
- my $udev_net_config = "$::prefix/etc/udev/rules.d/70-persistent-net.rules";
- my @old_config = cat_($udev_net_config);
- #- skip aliases and vlan interfaces
- foreach my $intf (grep { network::tools::is_real_interface($_) } detect_devices::get_lan_interfaces()) {
- (undef, my $mac_address) = get_eth_card_mac_address($intf) or next;
- #- do not write zeroed MAC addresses
- $mac_address =~ /^[0:]+$/ and next;
- #- skip already configured addresses
- any { !/^\s*#/ && /"$mac_address"/ } @old_config and next;
- my $type = cat_("/sys/class/net/$intf/type") =~ /^\d+$/;
- local $ENV{MATCHIFTYPE} = $type if $type;
- local $ENV{INTERFACE} = $intf;
- local $ENV{MATCHADDR} = $mac_address;
- local $ENV{COMMENT} = "Drakx-net rule for $intf ($mac_address)";
- run_program::rooted($::prefix, $net_name_helper, '>', '/dev/null', $mac_address);
- }
-}
-
# automatic net aliases configuration
sub configure_eth_aliases {
my ($modules_conf) = @_;
@@ -518,7 +496,6 @@ sub configure_eth_aliases {
$modules_conf->set_alias($card->[0], $card->[1]);
}
$::isStandalone and $modules_conf->write;
- update_udev_net_config();
}
sub get_link_detection_delay {