summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-23 05:05:37 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:35:00 -0700
commita97b06483e3006a7d21e534694e8d67d3b3c694d (patch)
tree42a1fdbb87e7b58f3ee7fd5f4e6454bee440d952
parent69d2dbd66fdd52b5ebbc6545ef693fdd3f0638ec (diff)
[PATCH] export DEVNAME on remove event
Fix from Sjoerd Simons <sjoerd@spring.luon.net>, it got lost on the recent reorganization of the udev processing stages.
-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: