diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2014-10-02 18:06:17 +0200 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2014-10-02 18:16:44 +0200 |
commit | aa49c2f1f1f89bca0ca6c6ed5c93c49f6e5c95e5 (patch) | |
tree | a32837f9918dd54956a70992506a71cb2fd1bee7 /Makefile.am | |
parent | 33481db83bb5f6f7d1017e17a00cd0012a06f117 (diff) | |
download | postgresql-setup-aa49c2f1f1f89bca0ca6c6ed5c93c49f6e5c95e5.tar.gz postgresql-setup-aa49c2f1f1f89bca0ca6c6ed5c93c49f6e5c95e5.tar.xz postgresql-setup-aa49c2f1f1f89bca0ca6c6ed5c93c49f6e5c95e5.zip |
sysvinit: generate init file when needed
From now, if ./configure --with-sysvinit is done, we install init
script and do not install systemd files. Original patch written
by Jozef MlĂch (jmlich@redhat.com).
* Makefile.am (initscriptsdir, nodist_initscripts_DATA): New
variables. New postgresql.init target.
* configure.ac: Add --with-sysvinit option.
* postgresql.init.in: New sysvinit template.
* .gitignore: Mention postgresql.init.
* NEWS: Document.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 8aeac27..9301d56 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,8 +9,13 @@ libexec_SCRIPTS = postgresql$(DISTSUFF)-ctl \ userunitsdir = /etc/systemd/system +if WANT_SYSVINIT +initscriptsdir = $(prefix)/etc/init.d +nodist_initscripts_DATA = postgresql$(DISTSUFF).init +else systemdunitsdir = $(prefix)/lib/systemd/system nodist_systemdunits_DATA = postgresql$(DISTSUFF).service postgresql$(DISTSUFF)@.service +endif nodist_doc_DATA = $(README_DIST_BASENAME) @@ -25,6 +30,9 @@ postgresql$(DISTSUFF)-setup: postgresql-setup.in $(c_s) postgresql$(DISTSUFF)-check-db-dir: postgresql-check-db-dir.in $(c_s) $(INSTANTIATE_SCRIPT) +postgresql$(DISTSUFF).init: postgresql.init.in $(c_s) + $(INSTANTIATE) + # In ideal world, postgresql@.service would be hardlink to postgresql.service. # That would require, however, the rhbz#1141824 resolved so we could install # system-default drop-in file. Make a "almost" duplicate files now. @@ -48,7 +56,8 @@ GENERATED_FILES = $(bin_SCRIPTS) \ $(libexec_SCRIPTS) \ $(nodist_doc_DATA) \ $(pkgsysconf_DATA) \ - $(nodist_systemdunits_DATA) + $(nodist_systemdunits_DATA) \ + $(nodist_initscripts_DATA) CLEANFILES = $(GENERATED_FILES) $(TEST_GEN_FILES_LIST) |