summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathijs Kwik <mathijs@bluescreen303.nl>2014-04-18 21:42:22 +0200
committerMathijs Kwik <mathijs@bluescreen303.nl>2014-04-18 21:42:22 +0200
commitbf841cd892c099ac674184ee31c7352cb62dad0a (patch)
tree162620c1adafa990b1762ec32355ef11a6dc5b19
parent5ee5aa1b909595133280580c9b2f0c32189e8894 (diff)
downloadnixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar.gz
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar.bz2
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar.lz
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar.xz
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.tar.zst
nixlib-bf841cd892c099ac674184ee31c7352cb62dad0a.zip
Revert "systemd: oneshot units should be allowed to restart on failure/abort"
This reverts commit c1e638abb67d51320907c1245992bea4a8694c83.

As pointed out by wkennington, upstream disallows all cases as of v207
-rw-r--r--nixos/modules/system/boot/systemd.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index ffa6d76481dc..6c6adab66e7c 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -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;