mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-20 08:37:55 +07:00
service: don't print a warning if we are in autorestart state, and can't start a unit just yet
This commit is contained in:
parent
47ec118473
commit
d4943dc755
@ -2476,11 +2476,12 @@ static int service_start(Unit *u) {
|
||||
/* A service that will be restarted must be stopped first to
|
||||
* trigger BindsTo and/or OnFailure dependencies. If a user
|
||||
* does not want to wait for the holdoff time to elapse, the
|
||||
* service should be manually restarted, not started. */
|
||||
if (s->state == SERVICE_AUTO_RESTART) {
|
||||
log_warning("%s automatic restart is pending, must be stopped before issuing start request.", UNIT(s)->id);
|
||||
* service should be manually restarted, not started. We
|
||||
* simply return EAGAIN here, so that any start jobs stay
|
||||
* queued, and assume that the auto restart timer will
|
||||
* eventually trigger the restart. */
|
||||
if (s->state == SERVICE_AUTO_RESTART)
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
assert(s->state == SERVICE_DEAD || s->state == SERVICE_FAILED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user