summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-18 02:42:43 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-18 02:42:43 +0200
commitd4943dc7559dff51d4d3bb737232b9328d6726e1 (patch)
tree5a3a525c62193f5380514b80a2c8ec97b18834b2 /src/core/service.c
parent47ec118473c864b6ae550fd7ee56d6f4982e5363 (diff)
service: don't print a warning if we are in autorestart state, and can't start a unit just yet
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c
index cf480ab979..5dc06b36cc 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -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);