Bug 537380 - udev does not run command added to 75-persistent-net-generator.rules
Summary: udev does not run command added to 75-persistent-net-generator.rules
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: udev
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-13 12:13 UTC by Francesco Librizzi
Modified: 2010-03-17 12:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-17 12:06:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Francesco Librizzi 2009-11-13 12:13:31 UTC
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:
PROGRAM="myscript"
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):
udev-141-4
and
udev-141-7

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 12:06:29 UTC
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.