udev-rules: only invoke ethtool for existing interfaces
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 6 Aug 2015 14:57:15 +0000 (16:57 +0200)
committerLubomir Rintel <lkundrak@v3.sk>
Tue, 18 Aug 2015 06:45:42 +0000 (08:45 +0200)
ethtool may cause the auto-loading of a kernel module for non-existing
interface-names. Avoid that by checking whether such an interface exists.

data/85-nm-unmanaged.rules

index aefab5c..e4057db 100644 (file)
@@ -2,6 +2,7 @@
 # To override or extend the rules place a file in /etc/udev/rules.d
 
 SUBSYSTEM!="net", GOTO="nm_unmanaged_end"
+ACTION!="add|change", GOTO="nm_unmanaged_end"
 
 # Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
 ENV{ID_NET_DRIVER}=="?*", GOTO="nm_unmanaged_driver"