Olaf Hering wrote: > I havent looked at the larger context, but I believe this changes > behaviour of udev. Currently udevstart can fix up your system for sure, > but with this change, a bogus file will not be removed if it happens to > have the same permissions. > Or will stats.st_rdev == makedev(major, minor) take care of that? yep, it will not change file permissions and ownership, if it already exists and is the correct node... we can also create a config flag, which changes the goto. You may look at the whole code. What I also wish is a flag for the DB, which indicates that the file already existed and should not be removed with the "remove" ACTION. > > >>--- udev-025/udev-add.c.keep 2004-04-21 23:39:10.000000000 +0200 >>+++ udev-025/udev-add.c 2004-06-02 12:08:16.728855024 +0200 >>@@ -114,10 +114,10 @@ >> goto create; >> >> /* preserve node with already correct numbers, to not change the inode number */ >>- if (((stats.st_mode & S_IFMT) == S_IFBLK || (stats.st_mode & S_IFMT) == S_IFCHR) && >>+ if (((stats.st_mode & S_IFMT) == (mode & S_IFMT)) && >> (stats.st_rdev == makedev(major, minor))) { >> dbg("preserve file '%s', cause it has correct dev_t", file); >>- goto perms; >>+ goto exit; >> } >> >> if (unlink(file) != 0) > > > > >