rename functions into functions.sfa, always ship it, and use it
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 17 Jan 2013 15:00:14 +0000 (16:00 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 17 Jan 2013 15:00:14 +0000 (16:00 +0100)
conditionnally on debian only

init.d/functions.sfa [moved from init.d/functions with 97% similarity]
init.d/sfa
setup.py

similarity index 97%
rename from init.d/functions
rename to init.d/functions.sfa
index f97c4ae..010ab41 100644 (file)
@@ -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.
 #
index 9ba3783..feb6163 100755 (executable)
@@ -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
index 239820d..55a7b47 100755 (executable)
--- 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',