udev-rules: only invoke ethtool for existing interfaces

ethtool may cause the auto-loading of a kernel module for non-existing
interface-names. Avoid that by checking whether such an interface exists.

(cherry picked from commit 9366bd7f90)
This commit is contained in:
Beniamino Galvani 2015-08-06 16:57:15 +02:00 committed by Thomas Haller
parent 5a422d385e
commit 2853fa9a42

View 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"