Commit 3b2775c5 authored by Lennart Poettering's avatar Lennart Poettering

unit: when deserializing do reconnect to dbus/syslog when they show up

parent fac9f8df
......@@ -1221,7 +1221,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
log_notice("Unit %s entered failed state.", u->meta.id);
unit_trigger_on_failure(u);
}
}
/* Some names are special */
if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) {
......@@ -1233,7 +1233,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
bus_init(u->meta.manager, true);
if (u->meta.type == UNIT_SERVICE &&
!UNIT_IS_ACTIVE_OR_RELOADING(os)) {
!UNIT_IS_ACTIVE_OR_RELOADING(os) &&
u->meta.manager->n_deserializing <= 0) {
/* Write audit record if we have just finished starting up */
manager_send_unit_audit(u->meta.manager, u, AUDIT_SERVICE_START, true);
u->meta.in_audit = true;
......@@ -1249,7 +1250,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
if (u->meta.type == UNIT_SERVICE &&
UNIT_IS_INACTIVE_OR_FAILED(ns) &&
!UNIT_IS_INACTIVE_OR_FAILED(os)) {
!UNIT_IS_INACTIVE_OR_FAILED(os) &&
u->meta.manager->n_deserializing <= 0) {
/* Hmm, if there was no start record written
* write it now, so that we always have a nice
......@@ -1268,7 +1270,6 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
}
manager_recheck_syslog(u->meta.manager);
}
/* Maybe we finished startup and are now ready for being
* stopped because unneeded? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment