From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Gordon Date: Sun, 12 Aug 2007 19:03:33 +0000 Subject: Re: udev not running new rules Message-Id: <1186945413.4142.16.camel@tigger> List-Id: References: <1186927115.3225.10.camel@tigger> In-Reply-To: <1186927115.3225.10.camel@tigger> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sun, 2007-08-12 at 16:19 +0200, Kay Sievers wrote: > On 8/12/07, Peter Gordon wrote: > > > > I am using Debian Etch. > > > > I have the directory in /etc/udev/rules.d > > > > lrwxrwxrwx 1 root root 20 2007-06-19 16:52 020_permissions.rules -> ../permissions.rules > > lrwxrwxrwx 1 root root 13 2007-06-19 16:52 udev.rules -> ../udev.rules > > -rwxr-xr-x 1 root root 138 2007-07-29 14:28 z19_persistent-anet.rules > > lrwxrwxrwx 1 root root 25 2007-06-19 16:52 z20_persistent-input.rules -> ../persistent-input.rules > > lrwxrwxrwx 1 root root 19 2007-06-19 16:52 z20_persistent.rules -> ../persistent.rules > > -rw-r--r-- 1 root root 1070 2007-06-19 17:09 z25_persistent-cd.rules > > lrwxrwxrwx 1 root root 23 2007-06-26 00:57 z25_persistent-net.rules -> ../persistent-net.rules > > lrwxrwxrwx 1 root root 12 2007-06-19 16:52 z50_run.rules -> ../run.rules > > lrwxrwxrwx 1 root root 16 2007-06-19 16:52 z55_hotplug.rules -> ../hotplug.rules > > lrwxrwxrwx 1 root root 29 2007-06-19 16:52 z75_cd-aliases-generator.rules -> ../cd-aliases-generator.rules > > > > Initially, the file ../persistent-net.rules does not exist. > > > > The rule z19_persistent-anet.rules is: > > > > PROGRAM="/var/www/lib/produce_persistent_rules.pl" > > > > The object of the program is to rename one of the NICs, and simply produces a rule > > SUBSYSTEMS="pci", KERNELS="0000:09:01.0", NAME="ctl" > > > > It runs a Perl program that creates the file ../persistent-net.rules. > > > > After a reboot, the file is created, but udev claims that it doesn't exist. > > > > After a second reboot, udev manages to read the file successfully. > > > > Killing udev and restarting doesn't help. > > > > It seems that udev firstly checks which files exist. How can I get the new rule set to be run as soon as it is created? > > Rules are just matches/actions for events. Adding or removing rules > does nothing to any already existent device. Only the next event would > be processed with the new rules. Does that explain your problem? > I have deleted the soft link as suggested by Marco d'Itri and it didn't help. I understand about the already existing device. If the event for a NIC occurs really early in the udev sequence, it would seem that the z19_persistent-anet.rules is being run after the NIC was created. I moved z19_persistent-anet.rules to 000z19_persistent-anet.rules to force it to be the first rule. It still creates the file, but doesn't manage to use the file until the following reboot. So I still don't have a handle on the problem. What would be the best way to get debugging output? Regards, Peter > Kay ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel