summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;