summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-23 14:43:52 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-03-24 14:22:42 +0100
commit5ce6e7f525ae7bec35ac6787d54315b6f65b6c9e (patch)
tree1fa72206fe50697deebb022a0c18c21f231dd3b5 /src/core/service.c
parentb3e4e23e834348cbd6a69c7eb0edff024eeb76bd (diff)
downloadsystemd-5ce6e7f525ae7bec35ac6787d54315b6f65b6c9e.tar.gz
core/service: rework the hold-off time over message
"hold-off" is apparently confusing, because we also have HoldoffTimeoutSec=. Let's use RestartSec= directly in the message. Fixes #5472.
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 23a5bcd1c4..5c66876c8f 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -3400,10 +3400,15 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
break;
case SERVICE_AUTO_RESTART:
- log_unit_info(UNIT(s),
- s->restart_usec > 0 ?
- "Service hold-off time over, scheduling restart." :
- "Service has no hold-off time, scheduling restart.");
+ if (s->restart_usec > 0) {
+ char buf_restart[FORMAT_TIMESPAN_MAX];
+ log_unit_info(UNIT(s),
+ "Service RestartSec=%s expired, scheduling restart.",
+ format_timespan(buf_restart, sizeof buf_restart, s->restart_usec, USEC_PER_SEC));
+ } else
+ log_unit_info(UNIT(s),
+ "Service has no hold-off time (RestartSec=0), scheduling restart.");
+
service_enter_restart(s);
break;