Bug 537380

Summary: udev does not run command added to 75-persistent-net-generator.rules
Product: [Fedora] Fedora Reporter: Francesco Librizzi <librizzi.fra>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: harald, librizzi.fra, paolo.penzo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-17 08:06:29 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Francesco Librizzi 2009-11-13 07:13:31 EST
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 
KERNEL=="eth*", RUN+="/usr/bin/myscript"

they are never executed.

If I create this one:
SUBSYSTEM=="net", RUN+="/usr/bin/myscript"
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):

How reproducible:
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
Actual results:
script never executed

Expected results:
the script is executed when /etc/udev/rules.d/70-persistent-net.rules does not exist

Additional info:
Comment 1 Harald Hoyer 2010-03-17 08:06:29 EDT
I think you should ask on forums, mailing lists on how to write udev rules. This is not a bug in udev.