info("device event will be ignored");
goto exit;
}
+ if (udev->name[0] == '\0') {
+ info("device renaming supressed");
+ goto exit;
+ }
/* look if we want to change the name of the netif */
if (strcmp(udev->name, udev->dev->kernel) != 0) {
linepos = line;
if (get_key(&linepos, &variable, &value) == 0) {
dbg("import '%s=%s'", variable, value);
- name_list_key_add(&udev->env_list, variable, value);
+
+ /* handle device, renamed by external tool, returning new path */
+ if (strcmp(variable, "DEVPATH") == 0) {
+ info("updating devpath from '%s' to '%s'", udev->dev->devpath, value);
+ sysfs_device_set_values(udev->dev, value, NULL, NULL);
+ } else
+ name_list_key_add(&udev->env_list, variable, value);
setenv(variable, value, 1);
}
}