Turn assertion about oneshot services into a warning

This commit is contained in:
Eelco Dolstra
2014-04-22 23:53:21 +02:00
parent 1c84988594
commit da444ff26f
+3 -4
View File
@@ -688,10 +688,9 @@ in
config = { config = {
assertions = mapAttrsToList (name: service: { warnings = concatLists (mapAttrsToList (name: service:
assertion = service.serviceConfig.Type or "" == "oneshot" -> service.serviceConfig.Restart or "no" == "no"; optional (service.serviceConfig.Type or "" == "oneshot" && service.serviceConfig.Restart or "no" != "no")
message = "${name}: Type=oneshot services must have Restart=no"; "Service ${name}.service with Type=oneshot must have Restart=no") cfg.services);
}) cfg.services;
system.build.units = cfg.units; system.build.units = cfg.units;