From bea99d7e37e57d209a146505313280c38c8548f1 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 10 Feb 2015 13:24:16 +0100 Subject: legacy-scripts: generate them from single template As we do not consider the postgresql@ unit variants (that would require libexec/initscripts/legacy-actions/postgresql@CONCRETE symlink to the default legacy-scripts directory), there is no need to do run-time checks. * Makefile.am (upgrade): Create from legacy-sysv-script.in template. (initdb): Likewise. (systemdlegacyscripts_DATA): Substitute with .. (systemdlegacyscripts_SCRIPTS): .. this to have execute bit after installation. (GENERATED_FILES): Add _SCRIPTS variant for systemdlegacyscripts. * legacy-sysv-script.in: New unified template for legacy scripts. * initdb.in: Remove. * upgrade.in: Likewise. * NEWS: Document. --- Makefile.am | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 32d2749..d303110 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ systemdunitsdir = $(prefix)/lib/systemd/system systemdunits_DATA = postgresql$(DISTSUFF).service postgresql$(DISTSUFF)@.service systemdlegacyscriptsdir = $(prefix)/libexec/initscripts/legacy-actions/postgresql$(DISTSUFF) -systemdlegacyscripts_DATA = initdb upgrade +systemdlegacyscripts_SCRIPTS = initdb upgrade endif doc_DATA = $(README_DIST_BASENAME) @@ -37,12 +37,8 @@ postgresql$(DISTSUFF)-check-db-dir: postgresql-check-db-dir.in $(c_s) postgresql$(DISTSUFF): postgresql.init.in $(c_s) $(INSTANTIATE) -initdb: initdb.in $(c_s) +initdb upgrade: legacy-sysv-script.in $(c_s) $(INSTANTIATE_SCRIPT) -upgrade: upgrade.in $(c_s) - $(INSTANTIATE_SCRIPT) - - # In ideal world, postgresql@.service would be hardlink to postgresql.service. # That would require, however, the rhbz#1141824 resolved so we could install @@ -69,7 +65,7 @@ GENERATED_FILES = $(bin_SCRIPTS) \ $(pkgsysconf_DATA) \ $(systemdunits_DATA) \ $(initscripts_DATA) \ - $(systemdlegacyscripts_DATA) + $(systemdlegacyscripts_SCRIPTS) CLEANFILES = $(GENERATED_FILES) $(TEST_GEN_FILES_LIST) -- cgit