summaryrefslogtreecommitdiffstats
path: root/src/core/service.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:23:36 +0000
commit3124284ced2903518f6d277b8c8d63ed79da47b7 (patch)
treea7e9aca4373a077d060a80c5ff9adbda67822f3f /src/core/service.c
parentReleasing progress-linux version 252.22-1~deb12u1~progress6.99u1. (diff)
downloadsystemd-3124284ced2903518f6d277b8c8d63ed79da47b7.tar.xz
systemd-3124284ced2903518f6d277b8c8d63ed79da47b7.zip
Merging upstream version 252.23.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 1d5b9ff..cdddd49 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -594,8 +594,7 @@ static int service_verify(Service *s) {
if (s->type != SERVICE_ONESHOT && s->exec_command[SERVICE_EXEC_START]->command_next)
return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.");
- if (s->type == SERVICE_ONESHOT &&
- !IN_SET(s->restart, SERVICE_RESTART_NO, SERVICE_RESTART_ON_FAILURE, SERVICE_RESTART_ON_ABNORMAL, SERVICE_RESTART_ON_WATCHDOG, SERVICE_RESTART_ON_ABORT))
+ if (s->type == SERVICE_ONESHOT && IN_SET(s->restart, SERVICE_RESTART_ALWAYS, SERVICE_RESTART_ON_SUCCESS))
return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has Restart= set to either always or on-success, which isn't allowed for Type=oneshot services. Refusing.");
if (s->type == SERVICE_ONESHOT && !exit_status_set_is_empty(&s->restart_force_status))