X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Funit.c;h=1874cdf78da7da668776d1fd4738364d5b52f994;hb=54165a39391980defef3bf3356041aac960f64af;hp=701dbc0952f8e561a2dc30fd8041c2d70d7ed416;hpb=9e58ff9c5c3bd46a796a20fc6c304cdab489f334;p=elogind.git diff --git a/src/unit.c b/src/unit.c index 701dbc095..1874cdf78 100644 --- a/src/unit.c +++ b/src/unit.c @@ -738,7 +738,7 @@ fail: u->meta.load_state = UNIT_FAILED; unit_add_to_dbus_queue(u); - log_debug("Failed to load configuration for %s: %s", u->meta.id, strerror(-r)); + log_notice("Failed to load configuration for %s: %s", u->meta.id, strerror(-r)); return r; } @@ -878,7 +878,7 @@ static void unit_check_uneeded(Unit *u) { if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) return; - log_debug("Service %s is not needed anymore. Stopping.", u->meta.id); + log_info("Service %s is not needed anymore. Stopping.", u->meta.id); /* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */ manager_add_job(u->meta.manager, JOB_STOP, u, JOB_FAIL, true, NULL); @@ -1020,10 +1020,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) { case JOB_RESTART: case JOB_TRY_RESTART: - if (ns == UNIT_INACTIVE) + if (ns == UNIT_INACTIVE || ns == UNIT_MAINTENANCE) job_finish_and_invalidate(u->meta.job, true); - else if (ns == UNIT_MAINTENANCE) - job_finish_and_invalidate(u->meta.job, false); else if (u->meta.job->state == JOB_RUNNING && ns != UNIT_DEACTIVATING) { unexpected = true; job_finish_and_invalidate(u->meta.job, false);