temporarily disabling udev
I need to patch udev to be sure that it will not modify /dev if udevstart has been not been run (e.g. because root disabled the init script, or it failed for some reason).
Would this work?
udev.c +12 -0
@@ -83,6 +83,15 @@ exit:return 0 ; } +/* return true if the udev database exists */ +static int udev_active (void ) { +struct stat stats; + +if (stat (udev_db_path, &stats) ==0 ) +return 1 ; +return 0 ; +} + static void asmlinkage sig_handler(int signum) {switch (signum) {
@@ -161,6 +170,9 @@ int main(int argc, char *argv[], char *eif (udev_log)setenv ("UDEV_LOG" ,"1" ,1 ); +if (!udev_active ()) + goto hotplug; +if ((strncmp (devpath,"/block/" ,7 ) ==0 ) || (strncmp (devpath,"/class/" ,7 ) ==0 )) {if (strcmp (action,"add" ) ==0 ) {/* wait for sysfs and possibly add node */
Signature · 2 lines
ciao, | Marco | [9919 peXnx6UiWKdTk]
Quoted 4 lines · Marco d'Itri
I need to patch udev to be sure that it will not modify /dev if udevstart has been not been run (e.g. because root disabled the init script, or it failed for some reason).
Would this work?
Removing the database, should not prevent the next udev run to create one. udev is used in initrd with /proc/sys/kernel/hotplug set to /sbin/udev in some setups, which will not work with this patch.
How does Debian disable udev? Can't you use this value instead?
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Kay Sievers
Quoted 4 lines
I need to patch udev to be sure that it will not modify /dev if udevstart has been not been run (e.g. because root disabled the init script, or it failed for some reason).
Would this work?Removing the database, should not prevent the next udev run to create one.
Do you have other suggestions?
Quoted 2 lines
udev is used in initrd with
/proc/sys/kernel/hotplugset to/sbin/udevin some setups, which will not work with this patch.
Why they do not run udevstart?
Quoted 1 line
How does Debian disable udev? Can't you use this value instead?
The standard method to disable a daemon is to disable its init script.
Signature · 2 lines
ciao, | Marco | [9920 alZroOc39eF8Y]
Quoted 9 lines · Marco d'Itri
Quoted 6 lines · Kay Sievers
Quoted 4 lines
I need to patch udev to be sure that it will not modify /dev if udevstart has been not been run (e.g. because root disabled the init script, or it failed for some reason).
Would this work?Removing the database, should not prevent the next udev run to create one.
Do you have other suggestions?
No, not really. I just see problems with the patch in the upstream version, cause of the numerous setups udev is used.
Quoted 3 lines
Quoted 2 lines
udev is used in initrd with
/proc/sys/kernel/hotplugset to/sbin/udevin some setups, which will not work with this patch.Why they do not run udevstart?
They want to use the device nodes after module load. At the time udevstart would run, there may not all modules be loaded.
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Kay Sievers
No, not really. I just see problems with the patch in the upstream version, cause of the numerous setups udev is used.
For the time being then I will keep it a debian-specific patch...
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
udev is used in initrd with
/proc/sys/kernel/hotplugset to/sbin/udevin some setups, which will not work with this patch.Why they do not run udevstart?
They want to use the device nodes after module load. At the time udevstart would run, there may not all modules be loaded.
I mean, what stops them from running udevstart before starting to load modules?
Signature · 2 lines
ciao, | Marco | [9923 soplLOhA2XZzc]