Red Hat Bugzilla – Bug 537380
udev does not run command added to 75-persistent-net-generator.rules
Last modified: 2010-03-17 08:06:29 EDT
Description of problem:
I know that the file /lib/udev/rules.d/75-persistent-net-generator.rules should not be modified but I did it only for try.
Indeed, if I create a custom rule like this:
SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/bin/myscript"
or like this
they are never executed.
If I create this one:
the rule is executed on system shutdowns.
So, I thought to modify the /lib/udev/rules.d/75-persistent-net-generator.rules adding to it:
after the invocation of the "write_net_rules" script.
I removed the file /etc/udev/rules.d/70-persistent-net.rules and
I run udevadm test /sys/class/net/eth0
the script has been executed perfectly.
Then I removed again the file /etc/udev/rules.d/70-persistent-net.rules and restarted the machine.
In this case the script has not been executed.
I tried to change PROGRAM with RUN+=, I achieved the same result (in this case udevadm test only shows RUN and it does not execute the script, but it is correct).
Version-Release number of selected component (if applicable):
follow the steps cited above
Steps to Reproduce:
1. modify /lib/udev/rules.d/75-persistent-net-generator.rules adding a script execution
2. remove /etc/udev/rules.d/70-persistent-net.rules
3. restart the machine
script never executed
the script is executed when /etc/udev/rules.d/70-persistent-net.rules does not exist
I think you should ask on forums, mailing lists on how to write udev rules. This is not a bug in udev.