Re: [PATCH] Add yet more crud so we can run /sbin/start_udev instead of udev (#514501).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens (clumens@xxxxxxxxxx) said: 
> > NAK. By running this script, you load all the modules here, which breaks any
> > of the blacklisting, driver disk overriding, etc.
> 
> Then I can't wait to hear what clever alternatives we have.

1) figure out what it actually requires to run correctly, do that instead
(really, a 300 line shell script that includes calls to md5sum and writing
of other shell scripts in /var?)

2) something like the attached, which just runs the hacky script where we
load modules now. Untested.

Bill

diff --git a/loader/hardware.c b/loader/hardware.c
index e9be279..a5df224 100644
--- a/loader/hardware.c
+++ b/loader/hardware.c
@@ -60,47 +60,12 @@ static int detectHardware() {
         dup2(fd, 2);
         close(fd);
 
-        rc = execl("/sbin/udevadm", "udevadm", "trigger", NULL);
+        rc = execl("/sbin/start_udev", "/sbin/start_udev", NULL);
         _exit(1);
     }
 
     waitpid(child, &status, 0);
     if (!WIFEXITED(status) || (WIFEXITED(status) && WEXITSTATUS(status))) {
-        rc = 1;
-    } else {
-        rc = 0;
-    }
-
-    fprintf(stderr, "waiting for hardware to initialize...\n");
-    logMessage(DEBUGLVL, "waiting for hardware to initialize");
-
-    if (!(child = fork())) {
-        char *args[] = { "/sbin/udevadm", "settle", NULL, NULL };
-        int fd = open("/dev/tty3", O_RDWR);
-
-        dup2(fd, 0);
-        dup2(fd, 1);
-        dup2(fd, 2);
-        close(fd);
-
-        if (timeout) {
-            if (asprintf(&args[2], "--timeout=%d", timeout) == -1) {
-                logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
-                abort();
-            }
-        }
-
-        rc = execv("/sbin/udevadm", args);
-        _exit(1);
-    }
-
-    waitpid(child, &status, 0);
-    if (!WIFEXITED(status) || (WIFEXITED(status) && WEXITSTATUS(status))) {
-        rc = 1;
-    } else {
-        rc = 0;
-    }
-    if (rc) {
         return LOADER_ERROR;
     }
     return LOADER_OK;
diff --git a/loader/init.c b/loader/init.c
index ff0f62e..ab16aca 100644
--- a/loader/init.c
+++ b/loader/init.c
@@ -510,11 +510,6 @@ int main(int argc, char **argv) {
             fatal_error(1);
         createDevices();
         printf("done\n");
-	printf("starting udev...");
-	if (fork() == 0) {
-	    execl("/sbin/udevd", "/sbin/udevd","--daemon",NULL);
-	    exit(1);
-	}
     }
     printf("done\n");
 
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux