chiark / gitweb /
[PATCH] export DEVNAME on remove event
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 23 Nov 2004 04:05:37 +0000 (05:05 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:35:00 +0000 (22:35 -0700)
Fix from Sjoerd Simons <sjoerd@spring.luon.net>, it got lost
on the recent reorganization of the udev processing stages.

udev.c

diff --git a/udev.c b/udev.c
index 39c16c2..605a55b 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -187,8 +187,11 @@ int main(int argc, char *argv[], char *envp[])
                /* get node from db, delete it*/
                retval = udev_remove_device(&udev);
 
-               /* run scripts */
-               dev_d_execute(&udev, DEVD_DIR, DEVD_SUFFIX);
+               /* run dev.d/ scripts if we're not instructed to ignore the event */
+               if (udev.devname[0] != '\0') {
+                       setenv("DEVNAME", udev.devname, 1);
+                       dev_d_execute(&udev, DEVD_DIR, DEVD_SUFFIX);
+               }
        }
 
 exit: