systemd: oneshot units should be allowed to restart on failure/abort
This commit is contained in:
parent
d17af6b9a8
commit
c1e638abb6
|
@ -637,7 +637,8 @@ in
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
assertions = mapAttrsToList (name: service: {
|
assertions = mapAttrsToList (name: service: {
|
||||||
assertion = service.serviceConfig.Type or "" == "oneshot" -> service.serviceConfig.Restart or "no" == "no";
|
assertion = service.serviceConfig.Type or "" == "oneshot" ->
|
||||||
|
builtins.elem (service.serviceConfig.Restart or "no") ["no" "on-failure" "on-abort"];
|
||||||
message = "${name}: Type=oneshot services must have Restart=no";
|
message = "${name}: Type=oneshot services must have Restart=no";
|
||||||
}) cfg.services;
|
}) cfg.services;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue