NetworkManager/data/84-nm-drivers.rules
Thomas Haller b57c1af814
udev: also react to "move" (and "change") udev actions in our rules
NetworkManager handles "add" and "move" actions the same way, by
tracking the "struct udev_device" instance.

Still, this means that also for move events, we need the right
attributes set.

See-also: https://github.com/openshift/sriov-network-operator/issues/414
2021-08-16 19:22:32 +02:00

13 lines
533 B
Plaintext

# Do not modify this file, it will get overwritten on updates.
# To override or extend the rules place a file in /etc/udev/rules.d
SUBSYSTEM!="net", GOTO="nm_drivers_end"
ACTION!="add|change|move", GOTO="nm_drivers_end"
# Determine ID_NET_DRIVER if there's no ID_NET_DRIVER or DRIVERS (old udev?)
ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
DRIVERS=="?*", GOTO="nm_drivers_end"
PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c"
LABEL="nm_drivers_end"