Am 13.08.19 um 17:50 schrieb Michael Biebl:
> Am 13.08.19 um 17:44 schrieb Michael Biebl:
>> It doesn't claim that this is a shell parseable format which can be run
>> through eval, so I don't think you can rely on that.
> 
> That aside, setting net.ifnames only for network interfaces does
> probably make sense, so something along the lines of the attached diff
> maybe.
> 
> 
> Martin, wdyt?

Or to make it more like the upstream 75-net-description.rules at
https://github.com/systemd/systemd/blob/master/rules/75-net-description.rules
updated diff attached

This also avoids running the import on remove events
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/debian/extra/rules/73-usb-net-by-mac.rules b/debian/extra/rules/73-usb-net-by-mac.rules
index 8969f59..069b080 100644
--- a/debian/extra/rules/73-usb-net-by-mac.rules
+++ b/debian/extra/rules/73-usb-net-by-mac.rules
@@ -3,10 +3,13 @@
 # is 0). Don't do this when ifnames is disabled via kernel command line or
 # customizing/disabling 99-default.link (or previously 80-net-setup-link.rules).
 
+ACTION=="remove", GOTO="usb_net_mac_end"
+SUBSYSTEM!="net", GOTO="usb_net_mac_end"
+
 IMPORT{cmdline}="net.ifnames"
 ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"
 
-ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
+SUBSYSTEMS=="usb", NAME=="", \
     ATTR{address}=="?[014589cd]:*", \
     TEST!="/etc/udev/rules.d/80-net-setup-link.rules", \
     TEST!="/etc/systemd/network/99-default.link", \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to