3
0
Fork 0
forked from mirrors/nixpkgs

nixos-generate-config: Emit boot.initrd.availableKernelModules instead of kerneLmodules

This commit is contained in:
Eelco Dolstra 2013-10-13 15:41:58 +02:00
parent 57804f44ec
commit 3875dcdfeb

View file

@ -105,7 +105,7 @@ sub pciCheck {
$class =~ /^0x0c03/ $class =~ /^0x0c03/
) )
{ {
push @initrdKernelModules, $module; push @initrdAvailableKernelModules, $module;
} }
} }
@ -174,7 +174,7 @@ sub usbCheck {
($class eq "03" && $protocol eq "01") ($class eq "03" && $protocol eq "01")
) )
{ {
push @initrdKernelModules, $module; push @initrdAvailableKernelModules, $module;
} }
} }
} }
@ -192,7 +192,7 @@ foreach my $path (glob "/sys/class/block/*") {
if (-e "$path/device/driver/module") { if (-e "$path/device/driver/module") {
$module = basename `readlink -f $path/device/driver/module`; $module = basename `readlink -f $path/device/driver/module`;
chomp $module; chomp $module;
push @initrdKernelModules, $module; push @initrdAvailableKernelModules, $module;
} }
} }
@ -313,7 +313,7 @@ sub multiLineList {
return $res; return $res;
} }
my $initrdKernelModules = toNixExpr(uniq @initrdKernelModules); my $initrdAvailableKernelModules = toNixExpr(uniq @initrdAvailableKernelModules);
my $kernelModules = toNixExpr(uniq @kernelModules); my $kernelModules = toNixExpr(uniq @kernelModules);
my $modulePackages = toNixExpr(uniq @modulePackages); my $modulePackages = toNixExpr(uniq @modulePackages);
@ -330,7 +330,7 @@ write_file($fn, <<EOF);
{ {
imports = ${\multiLineList(" ", @imports)}; imports = ${\multiLineList(" ", @imports)};
boot.initrd.kernelModules = [$initrdKernelModules ]; boot.initrd.availableKernelModules = [$initrdAvailableKernelModules ];
boot.kernelModules = [$kernelModules ]; boot.kernelModules = [$kernelModules ];
boot.extraModulePackages = [$modulePackages ]; boot.extraModulePackages = [$modulePackages ];