aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--psplash.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 5f3fc42..310e126 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,6 +11,8 @@ BUILT_SOURCES = psplash-poky-img.h psplash-bar-img.h
psplash_write_SOURCES = psplash-write.c psplash.h
if HAVE_SYSTEMD
+psplash_CPPFLAGS = $(SYSTEMD_CFLAGS) -DHAVE_SYSTEMD
+psplash_LDFLAGS= $(SYSTEMD_LIBS)
bin_PROGRAMS += psplash-systemd
psplash_systemd_CPPFLAGS = $(SYSTEMD_CFLAGS)
psplash_systemd_LDFLAGS= $(SYSTEMD_LIBS)
diff --git a/psplash.c b/psplash.c
index e5dff16..1a56629 100644
--- a/psplash.c
+++ b/psplash.c
@@ -15,6 +15,9 @@
#include "psplash-colors.h"
#include "psplash-poky-img.h"
#include "psplash-bar-img.h"
+#ifdef HAVE_SYSTEMD
+#include <systemd/sd-daemon.h>
+#endif
#include FONT_HEADER
#define SPLIT_LINE_POS(fb) \
@@ -285,6 +288,10 @@ main (int argc, char** argv)
goto fb_fail;
}
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "READY=1");
+#endif
+
/* Clear the background with #ecece1 */
psplash_fb_draw_rect (fb, 0, 0, fb->width, fb->height,
PSPLASH_BACKGROUND_COLOR);