diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-06 20:09:53 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-06 20:09:53 +0000 |
commit | 8ebde1ea8a59cabe61bcde80aea4738669420406 (patch) | |
tree | 5ec3dc649fcd682309de4976a75d52d493688106 /modules/installer/tools/nixos-hardware-scan.pl | |
parent | bb236f99de9b2115c20b163c99b0056b4b5797e1 (diff) | |
download | nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar.gz nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar.bz2 nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar.lz nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar.xz nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.tar.zst nixpkgs-8ebde1ea8a59cabe61bcde80aea4738669420406.zip |
* Add the modules for all block devices.
svn path=/nixos/trunk/; revision=19271
Diffstat (limited to 'modules/installer/tools/nixos-hardware-scan.pl')
-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 { |