openslp/SOURCES/openslp-2.0.0-notify-system...

40 lines
1.2 KiB
Diff

exporting patch:
# HG changeset patch
# User Stephen Gallagher <sgallagh@redhat.com>
# Date 1394805577 14400
# Fri Mar 14 09:59:37 2014 -0400
# Node ID ff9067316db43f8e1204c0a7a743574c9f94feb5
# Parent 598821da69f2f26b1e76447bfecf139a4210ad48
Notify systemd of start-up completion
diff -r 598821da69f2 -r ff9067316db4 openslp/slpd/Makefile.am
--- a/openslp/slpd/Makefile.am Sat Jun 08 15:14:45 2013 -0600
+++ b/openslp/slpd/Makefile.am Fri Mar 14 09:59:37 2014 -0400
@@ -93,5 +93,5 @@
slpd_index.h
#if you're building on Irix, replace .la with .a below
-slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la
+slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la -lsystemd
diff -r 598821da69f2 -r ff9067316db4 openslp/slpd/slpd_main.c
--- a/openslp/slpd/slpd_main.c Sat Jun 08 15:14:45 2013 -0600
+++ b/openslp/slpd/slpd_main.c Fri Mar 14 09:59:37 2014 -0400
@@ -58,6 +58,8 @@
#include "slp_xid.h"
#include "slp_net.h"
+#include <systemd/sd-daemon.h>
+
int G_SIGALRM;
int G_SIGTERM;
int G_SIGHUP;
@@ -666,6 +668,7 @@
/* Main loop */
SLPDLog("Startup complete entering main run loop ...\n\n");
+ sd_notify(0, "READY=1");
G_SIGALRM = 0;
G_SIGTERM = 0;
G_SIGHUP = 0;