Permalink
Browse files

init: use /run/modprobe.d instead /etc/modprobe.d

we also switch to using 'blacklist' instead of hard blacklisting via
install /bin/false since we're now expecting that this file be read
after leaving early userspace.
  • Loading branch information...
1 parent df5ae8d commit 57b18349e7a912e60f0a72a807b3d56f49c05e63 @falconindy committed Jun 1, 2011
Showing with 4 additions and 5 deletions.
  1. +4 −5 init.c
View
9 init.c
@@ -470,18 +470,17 @@ static void disable_modules(void) { /* {{{ */
}
/* ensure parent dirs exist */
- mkdir("/etc", 0755);
- mkdir("/etc/modprobe.d", 0755);
+ mkdir("/run/modprobe.d", 0755);
- fp = fopen("/etc/modprobe.d/initcpio.conf", "w");
+ fp = fopen("/run/modprobe.d/initcpio.conf", "w");
if (!fp) {
- perror("error: /etc/modprobe.d/initcpio.conf");
+ perror("error: /run/modprobe.d/initcpio.conf");
return;
}
var = strdup(getenv("disablemodules"));
for (tok = strtok(var, ","); tok; tok = strtok(NULL, ",")) {
- fprintf(fp, "install %s /bin/false\n", tok);
+ fprintf(fp, "blacklist %s\n", tok);
}
fclose(fp);

0 comments on commit 57b1834

Please sign in to comment.