mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
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.
This commit is contained in:
parent
b3e4e23e83
commit
5ce6e7f525
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user