[PATCH] build: improve systemd service file handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Fabio M. Di Nitto" <fdinitto@xxxxxxxxxx>

this solves the issue of having to special case before and after usrmove

Signed-off-by: Fabio M. Di Nitto <fdinitto@xxxxxxxxxx>
---
 configure.ac     |    6 ++++++
 corosync.spec.in |    3 ++-
 init/Makefile.am |    2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index dc374ca..f2222b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,11 @@ AC_ARG_WITH([initddir],
 	[ INITDDIR="$withval" ],
 	[ INITDDIR="$sysconfdir/init.d" ])
 
+AC_ARG_WITH([systemddir],
+	[  --with-systemddir=DIR   : path to systemd unit files directory. ],
+	[ SYSTEMDDIR="$withval" ],
+	[ SYSTEMDDIR="/lib/systemd/system" ])
+
 AC_ARG_ENABLE([snmp],
        [  --enable-snmp                   : SNMP protocol support ],
        [ default="no" ])
@@ -579,6 +584,7 @@ LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
 
 # substitute what we need:
 AC_SUBST([INITDDIR])
+AC_SUBST([SYSTEMDDIR])
 
 AC_SUBST([SOMAJOR])
 AC_SUBST([SOMINOR])
diff --git a/corosync.spec.in b/corosync.spec.in
index 7539c32..2bbc6c0 100644
--- a/corosync.spec.in
+++ b/corosync.spec.in
@@ -97,7 +97,8 @@ export rdmacm_LIBS=-lrdmacm \
 %if %{with xmlconf}
 	--enable-xmlconf \
 %endif
-	--with-initddir=%{_initrddir}
+	--with-initddir=%{_initrddir} \
+	--with-systemddir=%{_unitdir}
 
 make %{_smp_mflags}
 
diff --git a/init/Makefile.am b/init/Makefile.am
index 90d49c4..00d56d4 100644
--- a/init/Makefile.am
+++ b/init/Makefile.am
@@ -37,7 +37,7 @@ MAINTAINERCLEANFILES	= Makefile.in
 EXTRA_DIST		= generic.in notifyd.in corosync.service.in corosync-notifyd.service.in
 
 if INSTALL_SYSTEMD
-systemdconfdir = /lib/systemd/system
+systemdconfdir = $(SYSTEMDDIR)
 systemdconf_DATA = corosync.service corosync-notifyd.service
 else
 target_INIT		= generic notifyd
-- 
1.7.7.6

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux