* temporarily disabling udev
@ 2004-12-19 14:56 Marco d'Itri
2004-12-19 15:32 ` Kay Sievers
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Marco d'Itri @ 2004-12-19 14:56 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
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?
diff -ruNp udev-048.orig/udev.c udev-048/udev.c
--- udev-048.orig/udev.c 2004-12-08 20:43:16.000000000 +0100
+++ udev-048/udev.c 2004-12-19 15:09:51.000000000 +0100
@@ -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 *e
if (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 */
--
ciao, |
Marco | [9919 peXnx6UiWKdTk]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: temporarily disabling udev
2004-12-19 14:56 temporarily disabling udev Marco d'Itri
@ 2004-12-19 15:32 ` Kay Sievers
2004-12-19 15:43 ` Marco d'Itri
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-12-19 15:32 UTC (permalink / raw)
To: linux-hotplug
On Sun, 2004-12-19 at 15:56 +0100, Marco d'Itri wrote:
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: temporarily disabling udev
2004-12-19 14:56 temporarily disabling udev Marco d'Itri
2004-12-19 15:32 ` Kay Sievers
@ 2004-12-19 15:43 ` Marco d'Itri
2004-12-19 16:09 ` Kay Sievers
2004-12-19 16:58 ` Marco d'Itri
3 siblings, 0 replies; 5+ messages in thread
From: Marco d'Itri @ 2004-12-19 15:43 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote:
> > 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?
> udev is used in initrd with /proc/sys/kernel/hotplug set
> to /sbin/udev in some setups, which will not work with this patch.
Why they do not run udevstart?
> 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.
--
ciao, |
Marco | [9920 alZroOc39eF8Y]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling udev
2004-12-19 14:56 temporarily disabling udev Marco d'Itri
2004-12-19 15:32 ` Kay Sievers
2004-12-19 15:43 ` Marco d'Itri
@ 2004-12-19 16:09 ` Kay Sievers
2004-12-19 16:58 ` Marco d'Itri
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-12-19 16:09 UTC (permalink / raw)
To: linux-hotplug
On Sun, 2004-12-19 at 16:43 +0100, Marco d'Itri wrote:
> On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
> > > 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.
> > udev is used in initrd with /proc/sys/kernel/hotplug set
> > to /sbin/udev in 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: temporarily disabling udev
2004-12-19 14:56 temporarily disabling udev Marco d'Itri
` (2 preceding siblings ...)
2004-12-19 16:09 ` Kay Sievers
@ 2004-12-19 16:58 ` Marco d'Itri
3 siblings, 0 replies; 5+ messages in thread
From: Marco d'Itri @ 2004-12-19 16:58 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote:
> 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...
> > > udev is used in initrd with /proc/sys/kernel/hotplug set
> > > to /sbin/udev in 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?
--
ciao, |
Marco | [9923 soplLOhA2XZzc]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-19 16:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-19 14:56 temporarily disabling udev Marco d'Itri
2004-12-19 15:32 ` Kay Sievers
2004-12-19 15:43 ` Marco d'Itri
2004-12-19 16:09 ` Kay Sievers
2004-12-19 16:58 ` Marco d'Itri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).