[389-commits] Makefile.am Makefile.in wrappers/systemd.template.service.in wrappers/systemd.template.sysconfig
Richard Allen Megginson
rmeggins at fedoraproject.org
Mon Jan 23 22:47:32 UTC 2012
Makefile.am | 9 +++++++++
Makefile.in | 9 ++++++++-
wrappers/systemd.template.service.in | 8 +++++---
wrappers/systemd.template.sysconfig | 3 +++
4 files changed, 25 insertions(+), 4 deletions(-)
New commits:
commit 4eaced92bf5a8bafed9e0ceeaab6d06b41498142
Author: Rich Megginson <rmeggins at redhat.com>
Date: Mon Jan 23 13:56:42 2012 -0700
Ticket #263 - add systemd include directive
https://fedorahosted.org/389/ticket/263
Resolves: Ticket #263
Bug Description: add systemd include directive
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Include the file /etc/sysconfig/dirsrv.systemd in the
dirsrv at .service file, and add an empty /etc/sysconfig/dirsrv.systemd file.
Applications that want to customize the dirsrv at .service file do not need
to copy the file into /etc/systemd/system they can just edit the
/etc/sysconfig/dirsrv.systemd file.
Platforms tested: Fedora 16
Flag Day: no
Doc impact: no
diff --git a/Makefile.am b/Makefile.am
index 2f653b3..045c986 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -391,7 +391,12 @@ init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
wrappers/$(PACKAGE_NAME)-snmp
endif
+if SYSTEMD
+initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME) \
+ wrappers/$(PACKAGE_NAME).systemd
+else
initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
+endif
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
@@ -1544,6 +1549,10 @@ endif
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $^ > $@
+%/$(PACKAGE_NAME).systemd: %/systemd.template.sysconfig
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
+ $(fixupcmd) $^ > $@
+
%/$(systemdgroupname): %/systemd.group.in
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $^ > $@
diff --git a/Makefile.in b/Makefile.in
index ec0b5ba..b1d5c68 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1594,7 +1594,10 @@ task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \
@SYSTEMD_FALSE at init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
@SYSTEMD_FALSE@ wrappers/$(PACKAGE_NAME)-snmp
-initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
+ at SYSTEMD_FALSE@initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
+ at SYSTEMD_TRUE@initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME) \
+ at SYSTEMD_TRUE@ wrappers/$(PACKAGE_NAME).systemd
+
inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
ldap/admin/src/scripts/dsupdate.map \
@@ -10640,6 +10643,10 @@ ns-slapd.properties: makstrdb
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $^ > $@
+%/$(PACKAGE_NAME).systemd: %/systemd.template.sysconfig
+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
+ $(fixupcmd) $^ > $@
+
%/$(systemdgroupname): %/systemd.group.in
if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi
$(fixupcmd) $^ > $@
diff --git a/wrappers/systemd.template.service.in b/wrappers/systemd.template.service.in
index 68d796b..c36bc87 100644
--- a/wrappers/systemd.template.service.in
+++ b/wrappers/systemd.template.service.in
@@ -1,3 +1,5 @@
+# you usually do not want to edit this file - instead, edit the
+# @initconfigdir@/@package_name at .systemd file instead - otherwise,
# do not edit this file in /lib/systemd/system - instead, do the following:
# cp /lib/systemd/system/dirsrv\@.service /etc/systemd/system/dirsrv\@.service
# mkdir -p /etc/systemd/system/@systemdgroupname at .wants
@@ -21,6 +23,6 @@ EnvironmentFile=@initconfigdir@/@package_name@
EnvironmentFile=@initconfigdir@/@package_name at -%i
ExecStart=@sbindir@/ns-slapd -D @instconfigdir@/slapd-%i -i @localstatedir@/run/@package_name@/slapd-%i.pid -w @localstatedir@/run/@package_name@/slapd-%i.startpid
ExecStopPost=/bin/rm -f @localstatedir@/run/@package_name@/slapd-%i.pid
-# uncomment this line to raise the file descriptor limit - but do not edit this
-# file in /lib/systemd/system - see above for instructions
-# LimitNOFILE=8192
+# if you need to set other directives e.g. LimitNOFILE=8192
+# set them in this file
+.include @initconfigdir@/@package_name at .systemd
diff --git a/wrappers/systemd.template.sysconfig b/wrappers/systemd.template.sysconfig
new file mode 100644
index 0000000..d88bdcd
--- /dev/null
+++ b/wrappers/systemd.template.sysconfig
@@ -0,0 +1,3 @@
+[Service]
+# uncomment this line to raise the file descriptor limit
+# LimitNOFILE=8192
More information about the 389-commits
mailing list