Revert "systemd: oneshot units should be allowed to restart on failure/abort"

This reverts commit c1e638abb6.

As pointed out by wkennington, upstream disallows all cases as of v207
This commit is contained in:
Mathijs Kwik 2014-04-18 21:42:22 +02:00
parent 5ee5aa1b90
commit bf841cd892

View File

@ -688,8 +688,7 @@ in
config = {
assertions = mapAttrsToList (name: service: {
assertion = service.serviceConfig.Type or "" == "oneshot" ->
builtins.elem (service.serviceConfig.Restart or "no") ["no" "on-failure" "on-abort"];
assertion = service.serviceConfig.Type or "" == "oneshot" -> service.serviceConfig.Restart or "no" == "no";
message = "${name}: Type=oneshot services must have Restart=no";
}) cfg.services;