Merge pull request #62966 from bjornfor/nixos-generate-config-bcache

nixos-generate-config: add support for bcache
This commit is contained in:
Eelco Dolstra 2019-06-12 10:06:17 +02:00 committed by GitHub
commit 734b3e7758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,6 +258,11 @@ foreach my $path (glob "/sys/class/{block,mmc_host}/*") {
} }
} }
# Add bcache module, if needed.
my @bcacheDevices = glob("/dev/bcache*");
if (scalar @bcacheDevices > 0) {
push @initrdAvailableKernelModules, "bcache";
}
my $virt = `systemd-detect-virt`; my $virt = `systemd-detect-virt`;
chomp $virt; chomp $virt;