Query the "active-state" property of units in the "job-removed" handler
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>
Tue, 31 Jul 2012 15:52:06 +0000 (16:52 +0100)
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>
Tue, 31 Jul 2012 16:16:00 +0000 (17:16 +0100)
commit9d71065bfb59eb10fbd8ece605485d3864d08c08
tree12d236627b434b75404fb91be7bc857a9dc9b805
parent67227db2d1e6bc4937d33ba94fd753080e8eb31c
Query the "active-state" property of units in the "job-removed" handler

Our previous attempt to fix the TargetStartupMonitor failed because when
a target is stopped, systemd drops the unit from the system bus and the
proxies we created in TargetStartupMonitor were no longer associated
with these unit objects that previously existed on the bus. When such a
target is started again, the proxy will no longer receive property
change signals from systemd.

This commit tries to implement the TargetStartupMonitor in yet another
way, which is to listen to systemd's "job-removed" signal again. In
response to receiving "job-removed" signals, we now create a SystemdUnit
for the affected unit and query that for its current "active-state"
value. Perhaps this will work.
boot-manager/target-startup-monitor.c