]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Indicate the time when the manager started loading units the last time 20476/head
authorJan Macku <jamacku@redhat.com>
Thu, 2 Sep 2021 14:50:50 +0000 (16:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 Dec 2021 15:02:46 +0000 (16:02 +0100)
src/core/manager.c

index 2b2406b0185b9f2725b055b1d2bffc1d13a880dc..81d5387056250b1c233e7d6aca38b0d9bbed0b96 100644 (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;
 }