chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
47ec118
)
service: don't print a warning if we are in autorestart state, and can't start a...
author
Lennart Poettering
<lennart@poettering.net>
Wed, 18 Jul 2012 00:42:43 +0000
(
02:42
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 18 Jul 2012 00:42:43 +0000
(
02:42
+0200)
src/core/service.c
patch
|
blob
|
history
diff --git
a/src/core/service.c
b/src/core/service.c
index cf480ab979d3be55cea1a0e7b880a2c936b140a3..5dc06b36cc221948b61343aa2a31643b6627ae59 100644
(file)
--- 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
/* 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;
return -EAGAIN;
- }
assert(s->state == SERVICE_DEAD || s->state == SERVICE_FAILED);
assert(s->state == SERVICE_DEAD || s->state == SERVICE_FAILED);