mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-26 10:30:32 +00:00
[Backport release-25.11] nixos/systemd/initrd: fix modprobe (#512346)
This commit is contained in:
@@ -613,6 +613,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