1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-18 05:21:47 +03:00
mobile-nixos/boot/init/tasks/environment.rb
Samuel Dionne-Riel bdee7cf0e0 boot/init: Removes SingletonTask special dependency
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.
2020-02-03 16:19:10 -05:00

16 lines
529 B
Ruby

# Loads a basic environment.
# This is used mainly to make LD_LIBRARY_PATH valid, and additionally points
# PATH to extraUtils.
class Tasks::Environment < SingletonTask
def initialize()
# Make the Environment target depend on this task.
Targets[:Environment].add_dependency(:Task, self)
end
def run()
# Assumes this is *already* symlinked in the initrd.
# This is a sane assumption as running executables will fail without this.
UDev.simple_load_environment("/etc/udev/rules.d/00-env.rules")
end
end