Bug 537380 - udev does not run command added to 75-persistent-net-generator.rules
udev does not run command added to 75-persistent-net-generator.rules
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-11-13 07:13 EST by Francesco Librizzi
Modified: 2010-03-17 08:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-17 08:06:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
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.

Note You need to log in before you can comment on or make changes to this bug.