From d68201e9aa5e9ebd6085b1bb8892c42e9d20be75 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 8 Mar 2011 01:44:19 +0100 Subject: job: introduce new job result code 'skipped' to use when pre conditions of job did not apply https://bugzilla.redhat.com/show_bug.cgi?id=682245 https://bugzilla.redhat.com/show_bug.cgi?id=635780 --- src/systemctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/systemctl.c') diff --git a/src/systemctl.c b/src/systemctl.c index 6adcbcc066..f5a87fc701 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1249,7 +1249,7 @@ static int wait_for_jobs(DBusConnection *bus, Set *s) { 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."); } @@ -1257,7 +1257,7 @@ static int wait_for_jobs(DBusConnection *bus, Set *s) { 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; @@ -1417,11 +1417,15 @@ static int start_unit(DBusConnection *bus, char **args, unsigned n) { 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"; -- cgit v1.2.3-54-g00ecf