Am 28.08.2015 um 16:33 schrieb Michael Biebl:
> +ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end"
> +DRIVERS=="?*", GOTO="nm_unmanaged_drivers_end"
                           ^
Sorry, this was a typo. Noticed the second I hit send :-/

Fixed patch attached.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From cd6dcc56c596eb62da0364e9e503b338d1423799 Mon Sep 17 00:00:00 2001
From: Michael Biebl <[email protected]>
Date: Fri, 28 Aug 2015 16:30:15 +0200
Subject: [PATCH] Split out the bits which determine ID_NET_DRIVER or DRIVERS
 into separate udev rules file

Those are not required with systemd-udevd v210 or newer. This way
distros which have a new enough version of udev can skip installing
84-nm-drivers.rules. While at it, don't use absolute paths for sed and
ethtool.
---
 data/84-nm-drivers.rules   | 12 ++++++++++++
 data/85-nm-unmanaged.rules |  8 +-------
 data/Makefile.am           |  2 ++
 3 files changed, 15 insertions(+), 7 deletions(-)
 create mode 100644 data/84-nm-drivers.rules

diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules
new file mode 100644
index 0000000..d246ef6
--- /dev/null
+++ b/data/84-nm-drivers.rules
@@ -0,0 +1,12 @@
+# 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", 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 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
+
+LABEL="nm_drivers_end"
diff --git a/data/85-nm-unmanaged.rules b/data/85-nm-unmanaged.rules
index 9d2ad77..887ab84 100644
--- a/data/85-nm-unmanaged.rules
+++ b/data/85-nm-unmanaged.rules
@@ -1,15 +1,9 @@
-# Do not modify this file, it will get overwriten on updates.
+# 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_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"
-DRIVERS=="?*", GOTO="nm_unmanaged_driver"
-PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $1 | /bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", RESULT=="?*", ENV{ID_NET_DRIVER}="%c"
-LABEL="nm_unmanaged_driver"
-
 # VirtualBox host networking. Out-of-tree driver that looks like an ordinary
 # Ethernet. No parent device (lives in /virtual/), no support for ethtool
 # to identify the driver, MAC address defaults to 08:00:27:, but can be
diff --git a/data/Makefile.am b/data/Makefile.am
index 64ff337..ce059fc 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -37,6 +37,7 @@ examples_DATA = server.conf
 if WITH_UDEV_DIR
 udevrulesdir = $(UDEV_DIR)/rules.d
 udevrules_DATA = \
+	84-nm-drivers.rules \
 	85-nm-unmanaged.rules
 endif
 
@@ -57,6 +58,7 @@ EXTRA_DIST = \
 	NetworkManager-wait-online-systemd-pre200.service.in \
 	NetworkManager-dispatcher.service.in \
 	org.freedesktop.NetworkManager.service.in \
+	84-nm-drivers.rules \
 	85-nm-unmanaged.rules \
 	server.conf.in
 
-- 
2.5.0

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to