nixpkgs-suyu/upstart-jobs/hardware-scan.nix
Eelco Dolstra 07627d8cdd * Move starting of udevd (and udevtrigger/settle) into an Upstart
job.

svn path=/nixos/trunk/; revision=7330
2006-12-13 12:17:38 +00:00

23 lines
478 B
Nix

# !!! Don't like it that I have to pass the kernel here.
{kernel, module_init_tools}:
{
name = "hardware-scan";
job = "
start on udev
script
export MODULE_DIR=${kernel}/lib/modules/
# Try to load modules for all PCI devices.
for i in /sys/bus/pci/devices/*/modalias; do
echo \"Trying to load a module for $(basename $(dirname $i))...\"
${module_init_tools}/sbin/modprobe $(cat $i) || true
echo \"\"
done
end script
";
}