summaryrefslogtreecommitdiff
path: root/src/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/job.c b/src/job.c
index 8ab12cd624..79189f04da 100644
--- a/src/job.c
+++ b/src/job.c
@@ -385,6 +385,9 @@ int job_run_and_invalidate(Job *j) {
case JOB_START:
r = unit_start(j->unit);
+
+ /* If this unit cannot be started, then simply
+ * wait */
if (r == -EBADR)
r = 0;
break;
@@ -402,6 +405,11 @@ int job_run_and_invalidate(Job *j) {
case JOB_STOP:
r = unit_stop(j->unit);
+
+ /* If this unit cannot stopped, then simply
+ * wait. */
+ if (r == -EBADR)
+ r = 0;
break;
case JOB_RELOAD: