]> err.no Git - systemd/commitdiff
manager: use sd_notify() to notify parent systemd that we have finished startup
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:15:41 +0000 (02:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:15:41 +0000 (02:15 +0200)
Makefile.am
src/manager.c

index 8da2e1bbeed2d164afff5bb45a0883908c9ca3c3..2a027c38554f0a4aa559c6a9d135418ceeb554f3 100644 (file)
@@ -546,7 +546,8 @@ libsystemd_core_la_SOURCES = \
        src/tcpwrap.c \
        src/cgroup-util.c \
        src/condition.c \
-        src/dbus-common.c
+        src/dbus-common.c \
+        src/sd-daemon.c
 
 libsystemd_core_la_CFLAGS = \
        $(AM_CFLAGS) \
index 0830e8020efc8311cdfe4aa1217ad17ddabdefca..92a6dff14467b9ddc81492e928a3b18915e7a948 100644 (file)
@@ -58,6 +58,7 @@
 #include "special.h"
 #include "bus-errors.h"
 #include "exit-status.h"
+#include "sd-daemon.h"
 
 /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
 #define GC_QUEUE_ENTRIES_MAX 16
@@ -2944,6 +2945,10 @@ void manager_check_finished(Manager *m) {
         }
 
         bus_broadcast_finished(m, kernel_usec, initrd_usec, userspace_usec, total_usec);
+
+        sd_notifyf(false,
+                   "READY=1\nSTATUS=Startup finished in %s.",
+                   format_timespan(sum, sizeof(sum), total_usec));
 }
 
 void manager_run_generators(Manager *m) {