mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-18 21:41:53 +03:00
bdee7cf0e0
Instead, rely on targets. Additionally removes the "Boot" special dependency which only made sense when it was expected that having no dependency was an error.
19 lines
410 B
Ruby
19 lines
410 B
Ruby
class Tasks::Modules < Task
|
|
MODULES_PATH = "/lib/modules"
|
|
def initialize(*modules)
|
|
add_dependency(:Files, MODULES_PATH)
|
|
add_dependency(:Target, :Environment)
|
|
@modules = modules
|
|
end
|
|
|
|
def run()
|
|
@modules.each do |mod|
|
|
begin
|
|
System.run("modprobe", mod)
|
|
rescue System::CommandError
|
|
$logger.warn("Kernel module #{mod} failed to load.")
|
|
end
|
|
end
|
|
end
|
|
end
|