fs: fix raciness that was causing ensure-xyz
services to run multiple times per boot
This commit is contained in:
@@ -191,11 +191,14 @@ let
|
|||||||
in {
|
in {
|
||||||
systemd.services."${serviceNameFor path}" = {
|
systemd.services."${serviceNameFor path}" = {
|
||||||
description = "prepare ${path}";
|
description = "prepare ${path}";
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
|
|
||||||
serviceConfig.ExecStart = escapeShellArgs (
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true; # makes `systemctl start ensure-blah` a noop if already completed, instead of a restart
|
||||||
|
ExecStart = escapeShellArgs (
|
||||||
[ "${wrapperPath}" ] ++ wrapper.scriptArgs
|
[ "${wrapperPath}" ] ++ wrapper.scriptArgs
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
after = gen-opt.depends;
|
after = gen-opt.depends;
|
||||||
wants = gen-opt.depends;
|
wants = gen-opt.depends;
|
||||||
|
Reference in New Issue
Block a user