summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--udev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/udev.c b/udev.c
index 39c16c2e77..605a55bf19 100644
--- 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: