if ((j = manager_get_job(m, id))) {
if (r == -EALREADY)
r = job_finish_and_invalidate(j, JOB_DONE);
+ else if (r == -ENOEXEC)
+ r = job_finish_and_invalidate(j, JOB_SKIPPED);
else if (r == -EAGAIN)
j->state = JOB_WAITING;
else if (r < 0)
[JOB_CANCELED] = "canceled",
[JOB_TIMEOUT] = "timeout",
[JOB_FAILED] = "failed",
- [JOB_DEPENDENCY] = "dependency"
+ [JOB_DEPENDENCY] = "dependency",
+ [JOB_SKIPPED] = "skipped"
};
DEFINE_STRING_TABLE_LOOKUP(job_result, JobResult);
log_error("Job canceled.");
else if (streq(d.result, "dependency"))
log_error("A dependency job failed. See system logs for details.");
- else if (!streq(d.result, "done"))
+ else if (!streq(d.result, "done") && !streq(d.result, "skipped"))
log_error("Job failed. See system logs and 'systemctl status' for details.");
}
r = -ETIME;
else if (streq_ptr(d.result, "canceled"))
r = -ECANCELED;
- else if (!streq_ptr(d.result, "done"))
+ else if (!streq_ptr(d.result, "done") && !streq_ptr(d.result, "skipped"))
r = -EIO;
else
r = 0;
streq(args[0], "stop") ? "StopUnit" :
streq(args[0], "reload") ? "ReloadUnit" :
streq(args[0], "restart") ? "RestartUnit" :
+
streq(args[0], "try-restart") ||
streq(args[0], "condrestart") ? "TryRestartUnit" :
+
streq(args[0], "reload-or-restart") ? "ReloadOrRestartUnit" :
+
streq(args[0], "reload-or-try-restart") ||
streq(args[0], "condreload") ||
+
streq(args[0], "force-reload") ? "ReloadOrTryRestartUnit" :
"StartUnit";