Does this help?:
$ dmesg | grep -E "enp3s0|eth0"
[ 2.146664] sky2 0000:03:00.0 eth0: addr 00:23:8b:16:df:4c
[ 2.430154] systemd-udevd[142]: renamed network interface eth0 to enp3s0
[ 3.919376] sky2 0000:03:00.0 enp3s0: enabling interface
[ 3.919453] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
But i just wondered why this is the way it is :-)
$ cat /etc/udev/rules.d/99-wol.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="e*", RUN+="/usr/bin/touch /%k"
creates the file /enp3s0
I don't understand this. Is it some kind of race-condition thing or what is it?
]]>ACTION=="add", SUBSYSTEM=="net", DRIVERS=="r8168", RUN+="/usr/bin/ethtool -s %k wol d"
But the "problem" still exists after renaming 100-wol.rules to 99-wol.rules (which REALLY comes AFTER 80 )
]]>I want to enable WOL for my ethernet-card using a udev-rule and have some problems understanding udev's behaviour.
I've created the following file which works perfectly:
$ cat /etc/udev/rules.d/100-wol.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/usr/bin/ethtool -s %k wol g"
But /usr/lib/udev/rules.d/80-net-name-slot.rules renames the interface to enp3s0.
So my question is:
If 80-net-name-slot.rules renames the device to enp3s0 and my rules-file is executed afterwards (starts with 100), why does the above rule work. Shouldn't this one work?:
$ cat /etc/udev/rules.d/100-wol.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="enp3s0", RUN+="/usr/bin/ethtool -s %k wol g"
Does anyone know why the first script works instead of the second one?
]]>