Ignore systemd-modules-load errors

On NixOS, ‘boot.kernelModules’ has historically contained modules that
may not exist or load everywhere, so don't barf on those.
This commit is contained in:
Eelco Dolstra 2012-10-12 17:39:06 -04:00
parent 161c837c49
commit 53f216885f

View File

@ -225,6 +225,11 @@ in
{ Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${config.system.build.systemd}/lib/systemd/systemd-modules-load";
# Ignore failed module loads. Typically some of the
# modules in boot.kernelModules are "nice to have but
# not required" (e.g. acpi-cpufreq), so we don't want to
# barf on those.
SuccessExitStatus = "0 1";
};
restartTriggers = [ kernelModulesConf ];
};