From 53f216885faf480ad4d1e2c57fce2335bda30958 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Oct 2012 17:39:06 -0400 Subject: [PATCH] Ignore systemd-modules-load errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On NixOS, ‘boot.kernelModules’ has historically contained modules that may not exist or load everywhere, so don't barf on those. --- modules/system/boot/kernel.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/system/boot/kernel.nix b/modules/system/boot/kernel.nix index 130adb1110a1..4b6436a77f76 100644 --- a/modules/system/boot/kernel.nix +++ b/modules/system/boot/kernel.nix @@ -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 ]; };