- /* run dev.d/ scripts if we created a node or changed a netif name */
- if (udev_dev_d && udev.devname[0] != '\0') {
- setenv("DEVNAME", udev.devname, 1);
- udev_multiplex_directory(&udev, DEVD_DIR, DEVD_SUFFIX);
+ udev_rules_get_name(&rules, udev);
+ if (udev->ignore_device) {
+ dbg("device event will be ignored");
+ goto exit;
+ }
+ if (udev->name[0] != '\0')
+ retval = udev_device_event(&rules, udev);
+ else
+ info("device node creation supressed");
+
+ if (retval == 0 && udev_run) {
+ struct name_entry *name_loop;
+
+ dbg("executing run list");
+ list_for_each_entry(name_loop, &udev->run_list, node) {
+ if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
+ pass_env_to_socket(&name_loop->name[strlen("socket:")], udev->dev->devpath, "add");
+ else {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ udev_rules_apply_format(udev, program, sizeof(program));
+ run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO));
+ }
+ }