1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmlockd: utilize SD_NOTIFY_SUPPORT

Update makefile and code to better utilize SD_NOTIFY_SUPPORT var.
This commit is contained in:
Zdenek Kabelac 2024-12-06 17:13:24 +01:00
parent ee97c5c633
commit d8726b07c3
3 changed files with 6 additions and 4 deletions

View File

@ -50,8 +50,7 @@ INCLUDES += -I$(top_srcdir)/libdaemon/server
LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS)
ifneq (,$(firstword $(LIBSYSTEMD_LIBS)))
DEFS += -DUSE_SD_NOTIFY
ifeq ("@SD_NOTIFY_SUPPORT@", "yes")
CFLAGS += $(LIBSYSTEMD_CFLAGS)
LIBS += $(LIBSYSTEMD_LIBS)
endif

View File

@ -31,7 +31,7 @@
#include <sys/utsname.h>
#include <sys/un.h>
#ifdef USE_SD_NOTIFY
#ifdef SD_NOTIFY_SUPPORT
#include <systemd/sd-daemon.h>
#endif
@ -6191,7 +6191,7 @@ static int main_loop(daemon_state *ds_arg)
setup_worker_thread();
setup_restart();
#ifdef USE_SD_NOTIFY
#ifdef SD_NOTIFY_SUPPORT
sd_notify(0, "READY=1");
#endif

View File

@ -660,6 +660,9 @@
/* Define to 1 to include the LVM readline shell. */
#undef READLINE_SUPPORT
/* Define to 1 to include code that uses sd_notify. */
#undef SD_NOTIFY_SUPPORT
/* Define to 1 to include built-in support for snapshots. */
#undef SNAPSHOT_INTERNAL