diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-12 06:21:16 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:25:09 -0700 |
commit | 8673dcb84299fd2adba6281c5359bed4399d5b2d (patch) | |
tree | 9db3b5d4e7218b098c53d62b8805c9c9368a78af /udev.c | |
parent | af4b05d4917fdfa55eff3d8d53a830464d8162a1 (diff) |
[PATCH] Make dev.d/ handling a separate processing stage
Move the logic when and how to call the dev.d/ scripts into the
main processing path.
Diffstat (limited to 'udev.c')
-rw-r--r-- | udev.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -165,8 +165,11 @@ int main(int argc, char *argv[], char *envp[]) /* name, create node, store in db */ retval = udev_add_device(&udev, class_dev); - /* run scripts */ - dev_d_execute(&udev); + /* run dev.d/ scripts if we created a node or changed a netif name */ + if (udev.devname[0] != '\0') { + setenv("DEVNAME", udev.devname, 1); + dev_d_execute(&udev, DEVD_DIR, DEVD_SUFFIX); + } sysfs_close_class_device(class_dev); break; @@ -177,7 +180,7 @@ int main(int argc, char *argv[], char *envp[]) retval = udev_remove_device(&udev); /* run scripts */ - dev_d_execute(&udev); + dev_d_execute(&udev, DEVD_DIR, DEVD_SUFFIX); } exit: |