mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixos/systemd/initrd: fix modprobe
Contains the same fix as in d36077c0b6 but
now for the initrd.
This commit is contained in:
@@ -640,6 +640,10 @@ in
|
||||
) cfg.automounts
|
||||
);
|
||||
|
||||
services."modprobe@" = lib.mkIf (config.system.build.kernel.config.isYes "MODULES") {
|
||||
serviceConfig.ExecSearchPath = lib.makeBinPath [ cfg.package.kmod ];
|
||||
};
|
||||
|
||||
services.initrd-find-nixos-closure = lib.mkIf (!config.system.nixos-init.enable) {
|
||||
description = "Find NixOS closure";
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
rtt = machine.succeed("cat /sys/module/tcp_hybla/parameters/rtt0")
|
||||
assert int(rtt) == 42, "Parameter should be respected for initrd kernel modules"
|
||||
|
||||
with subtest("modprobe@ services work"):
|
||||
modprobe_service_status = machine.succeed("systemctl show --property ExecMainStatus modprobe@9pnet_virtio.service")
|
||||
t.assertEqual("ExecMainStatus=0\n", modprobe_service_status)
|
||||
|
||||
# Make sure it sticks in stage 2
|
||||
machine.switch_root()
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
Reference in New Issue
Block a user