mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixos/systemd: fix modprobe
Upstream systemd changed how modprobe is discovered. It is now searched for on path. Thus, add the kmod package to the ExecSearchPath of the modprobe@.service.
This commit is contained in:
@@ -792,6 +792,10 @@ in
|
||||
path = [ pkgs.util-linux ];
|
||||
overrideStrategy = "asDropin";
|
||||
};
|
||||
systemd.services."modprobe@" = {
|
||||
restartIfChanged = false;
|
||||
serviceConfig.ExecSearchPath = lib.makeBinPath [ pkgs.kmod ];
|
||||
};
|
||||
systemd.services.systemd-random-seed.restartIfChanged = false;
|
||||
systemd.services.systemd-remount-fs.restartIfChanged = false;
|
||||
systemd.services.systemd-update-utmp.restartIfChanged = false;
|
||||
|
||||
@@ -60,5 +60,10 @@ in
|
||||
machine.succeed("systemctl status example.service | grep 'Active: active'")
|
||||
|
||||
machine.succeed("systemctl show --property TasksMax --value user-1000.slice | grep 100")
|
||||
|
||||
with subtest("modprobe@ services work"):
|
||||
modprobe_service_status = machine.succeed("systemctl show --property ExecMainStatus modprobe@configfs.service")
|
||||
print(modprobe_service_status)
|
||||
t.assertEqual("ExecMainStatus=0\n", modprobe_service_status)
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user