From 6bf0f408e4833152197fb38fb10a9989c89f3a59 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 9 Feb 2016 18:38:03 +0100 Subject: core: make the StartLimitXYZ= settings generic and apply to any kind of unit, not just services This moves the StartLimitBurst=, StartLimitInterval=, StartLimitAction=, RebootArgument= from the [Service] section into the [Unit] section of unit files, and thus support it in all unit types, not just in services. This way we can enforce the start limit much earlier, in particular before testing the unit conditions, so that repeated start-up failure due to failed conditions is also considered for the start limit logic. For compatibility the four options may also be configured in the [Service] section still, but we only document them in their new section [Unit]. This also renamed the socket unit failure code "service-failed-permanent" into "service-start-limit-hit" to express more clearly what it is about, after all it's only triggered through the start limit being hit. Finally, the code in busname_trigger_notify() and socket_trigger_notify() is altered to become more alike. Fixes: #2467 --- src/core/service.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core/service.h') diff --git a/src/core/service.h b/src/core/service.h index 24408940d4..55fcec48c7 100644 --- a/src/core/service.h +++ b/src/core/service.h @@ -88,7 +88,6 @@ typedef enum ServiceResult { SERVICE_FAILURE_SIGNAL, SERVICE_FAILURE_CORE_DUMP, SERVICE_FAILURE_WATCHDOG, - SERVICE_FAILURE_START_LIMIT, _SERVICE_RESULT_MAX, _SERVICE_RESULT_INVALID = -1 } ServiceResult; @@ -178,10 +177,7 @@ struct Service { char *status_text; int status_errno; - RateLimit start_limit; - FailureAction start_limit_action; FailureAction failure_action; - char *reboot_arg; UnitRef accept_socket; -- cgit v1.2.3-54-g00ecf