From 145e08e0fba6fe0478be69213b5d9b873d77f229 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 17 Jan 2013 16:00:14 +0100 Subject: [PATCH] rename functions into functions.sfa, always ship it, and use it conditionnally on debian only --- init.d/{functions => functions.sfa} | 10 ++++++++++ init.d/sfa | 1 + setup.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) rename init.d/{functions => functions.sfa} (97%) diff --git a/init.d/functions b/init.d/functions.sfa similarity index 97% rename from init.d/functions rename to init.d/functions.sfa index f97c4ae1..010ab419 100644 --- a/init.d/functions +++ b/init.d/functions.sfa @@ -1,5 +1,15 @@ # -*-Shell-script-*- # +# Thierry, jan 17 2013 +# this file was put together by Jordan to provide the same interface as +# /etc/init.d/functions on fedora systems +# (probably is extracted from one of the fedora releases as is, not sure about that) +# +# we unconditionnally ship this as /etc/init.d/functions.sfa, +# and then our own initscript (init.d/sfa) does source that +# conditionnally, i.e. when run on debian systems +#################### +# # functions This file contains functions to be used by most or all # shell scripts in the /etc/init.d directory. # diff --git a/init.d/sfa b/init.d/sfa index 9ba37836..feb61639 100755 --- a/init.d/sfa +++ b/init.d/sfa @@ -37,6 +37,7 @@ if [ -f /etc/redhat-release ] ; then PGLOCK=/var/lock/subsys/postgresql SFALOCK=/var/lock/subsys/sfa-start.pid elif [ -f /etc/debian_version ] ; then + . /etc/init.d/funcfions.sfa debian_get_postgresql_versions PGDATA=/etc/postgresql/$pgver/main/ PGWATCH=postgres diff --git a/setup.py b/setup.py index 239820dc..55a7b47e 100755 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ packages = [ ] # need to do something about functions -initscripts = [ 'functions', 'sfa', 'sfa-cm' ] +initscripts = [ 'sfa', 'sfa-cm', 'functions.sfa' ] data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml', 'config/registries.xml', -- 2.43.0