summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-12-12 03:29:59 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:13:48 -0700
commit7e0bd584756b87d57b3f3e62dcbac208476f1804 (patch)
tree8b63cf1d5765f5743ea10366d5a0ca74d413f7cf
parent8544c9ad4febef602d640905a70c350364f98967 (diff)
[PATCH] check earlier if we should run as udevstart
-rw-r--r--udev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/udev.c b/udev.c
index 4d25ed267a..0ee70529c4 100644
--- a/udev.c
+++ b/udev.c
@@ -128,14 +128,6 @@ int main(int argc, char *argv[], char *envp[])
/* trigger timeout to prevent hanging processes */
alarm(ALARM_TIMEOUT);
- action = getenv("ACTION");
- devpath = getenv("DEVPATH");
- subsystem = getenv("SUBSYSTEM");
- /* older kernels passed the SUBSYSTEM only as argument */
- if (!subsystem && argc == 2)
- subsystem = argv[1];
- udev_init_device(&udev, devpath, subsystem);
-
if (strstr(argv[0], "udevstart") || (argc == 2 && strstr(argv[1], "udevstart"))) {
dbg("udevstart");
@@ -147,6 +139,14 @@ int main(int argc, char *argv[], char *envp[])
goto exit;
}
+ action = getenv("ACTION");
+ devpath = getenv("DEVPATH");
+ subsystem = getenv("SUBSYSTEM");
+ /* older kernels passed the SUBSYSTEM only as argument */
+ if (!subsystem && argc == 2)
+ subsystem = argv[1];
+ udev_init_device(&udev, devpath, subsystem);
+
if (!action) {
dbg("no action");
goto hotplug;