[PATCH rhel5 4/4] Write /etc/modprobe.d/anaconda.conf blacklist (#569883)

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

 



So that the modules will remain blacklisted through reboots, write out
a blacklist file for modprobe.

Related: rhbz#569883
---
 loader2/modules.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/loader2/modules.c b/loader2/modules.c
index b30fb2f..c057444 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -824,6 +824,22 @@ static int writeModulesConf(moduleList list, char *conf) {
     }
 
     close(fd);
+
+    /* Write out the blacklist, used by modprobe on bootup */
+    fd = open("/etc/modprobe.d/anaconda.conf", O_WRONLY | O_CREAT, 0666);
+    if (fd == -1) {
+        logMessage(ERROR, "error writing /etc/modprobe.d/anaconda.conf: %s\n",
+                    strerror(errno));
+        return 0;
+    }
+    for (i=0; i < cmdline_argc; i++) {
+        if (!strncasecmp(cmdline_argv[i], "blacklist=", 10)) {
+            sprintf( buf, "blacklist %s\n", cmdline_argv[i][10] );
+            ret = write(fd, buf, strlen(buf));
+        }
+    }
+    close(fd);
+
     return 0;
 }
 
-- 
1.7.4

_______________________________________________
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