5

I am seeing strange issue with 73-usb-net-by-mac.rules file.

This udev rule file has the check if the net.ifnames is defined in kernel command line then it will go to the end and skip the rules in between as below:

IMPORT{cmdline}="net.ifnames", ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"

Somehow this is not working at my end. I mean I have net.ifnames=0 in my kernel command line and still the usb net naming rule is executed.

If I split the above rule line like below then it works fine as it supposed to work:

IMPORT{cmdline}="net.ifnames"
ENV{net.ifnames}=="0", GOTO="usb_net_by_mac_end"

Is it like the udev doesn't parse the keys after IMPORT key on the same line?

Could you please let me know if am doing something wrong or the rule needs to be changed?

edwinksl
  • 24,109
sparty
  • 53

1 Answers1

1

This is a problem with the version of 73-net-by-mac.rules in ubuntu (and debian) which has been fixed in tag debian/233-5 of the pkg-systemd source.

The binary packages resulting from these changes don't appear to have made it into the debian or ubuntu apt repos yet.

For reference, the corrected file is found here:

https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/extra/rules/73-usb-net-by-mac.rules?h=debian/233-5

In reply to user.dz: I am actually using Debian 8.7. I do not know which distro the OP was using, but I presume that both ubuntu and debian would have the same problem (since both seem to use packages derived from the same source). The installed name of the file is /lib/udevd/rules.d/73-usb-net-by-mac.rules. It is owned by the udev package.