diff options
-rw-r--r-- | modules/installer/tools/nixos-hardware-scan.pl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/installer/tools/nixos-hardware-scan.pl b/modules/installer/tools/nixos-hardware-scan.pl index 50ce8a043f6..dd522f543bd 100644 --- a/modules/installer/tools/nixos-hardware-scan.pl +++ b/modules/installer/tools/nixos-hardware-scan.pl @@ -176,6 +176,19 @@ foreach my $path (glob "/sys/bus/usb/devices/*") { } +# Add the modules for all block devices. + +foreach my $path (glob "/sys/class/block/*") { + my $module; + print STDERR "$path\n"; + if (-e "$path/device/driver/module") { + $module = basename `readlink -f $path/device/driver/module`; + chomp $module; + push @initrdKernelModules, $module; + } +} + + # Generate the configuration file. sub removeDups { |