From fb3629df494efd7b8ab80ab58663bdff1720f2b0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 22 Apr 2014 23:52:07 +0200 Subject: [PATCH] systemd: Re-allow Restart=yes with Type=oneshot --- pkgs/os-specific/linux/systemd/fixes.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/fixes.patch b/pkgs/os-specific/linux/systemd/fixes.patch index c33d05da55a..2004204e442 100644 --- a/pkgs/os-specific/linux/systemd/fixes.patch +++ b/pkgs/os-specific/linux/systemd/fixes.patch @@ -26,6 +26,22 @@ index 41605ee..8517369 100644 if (switch_root_dir) args[i++] = "--switched-root"; args[i++] = arg_running_as == SYSTEMD_SYSTEM ? "--system" : "--user"; +diff --git a/src/core/service.c b/src/core/service.c +index ae3695a..6b3aa45 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -1096,11 +1096,6 @@ static int service_verify(Service *s) { + return -EINVAL; + } + +- if (s->type == SERVICE_ONESHOT && s->restart != SERVICE_RESTART_NO) { +- log_error_unit(UNIT(s)->id, "%s has Restart setting other than no, which isn't allowed for Type=oneshot services. Refusing.", UNIT(s)->id); +- return -EINVAL; +- } +- + if (s->type == SERVICE_DBUS && !s->bus_name) { + log_error_unit(UNIT(s)->id, "%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->id); + return -EINVAL; diff --git a/src/core/socket.c b/src/core/socket.c index 7c18a2b..eba67d5 100644 --- a/src/core/socket.c