{
int retval = 0;
+ if (udev->devpath_old != NULL)
+ if (udev_db_rename(udev->devpath_old, udev->dev->devpath) == 0)
+ info("moved database from '%s' to '%s'", udev->devpath_old, udev->dev->devpath);
+
/* add device node */
if (major(udev->devt) != 0 &&
(strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) {
/* import database entry, and delete it */
if (udev_db_get_device(udev, udev->dev->devpath) == 0) {
udev_db_delete_device(udev);
- if (udev->ignore_remove) {
- info("ignore_remove for '%s'", udev->name);
- goto exit;
- }
/* restore stored persistent data */
list_for_each_entry(name_loop, &udev->env_list, node)
putenv(name_loop->name);
goto exit;
}
+ if (udev->ignore_remove) {
+ info("ignore_remove for '%s'", udev->name);
+ goto exit;
+ }
/* remove the node */
retval = udev_node_remove(udev);