core: Indicate the time when the manager started loading units the last time

This commit is contained in:
Jan Macku
2021-12-07 16:02:46 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 49fbe940a4
commit 15b9243c0d
+5
View File
@@ -1729,6 +1729,11 @@ static void manager_ready(Manager *m) {
/* Let's finally catch up with any changes that took place while we were reloading/reexecing */
manager_catchup(m);
/* Create a file which will indicate when the manager started loading units the last time. */
(void) touch_file("/run/systemd/systemd-units-load", false,
m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD].realtime ?: now(CLOCK_REALTIME),
UID_INVALID, GID_INVALID, 0444);
m->honor_device_enumeration = true;
}