Eventscripts: make loadconfig() function hookable by the test suite.
authorMartin Schwenke <martin@meltin.net>
Tue, 31 Aug 2010 07:40:40 +0000 (17:40 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 17 Nov 2010 00:46:48 +0000 (11:46 +1100)
Rename loadconfig() to _loadconfig().  Add a new loadconfig() that
simply calls _loadconfig().

This makes it easy for the test suite to override loadconfig().

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/functions

index 854060a66492adf6b2720159b87a6576e2d0e546..610085b67700feb1faad5c715df79cb506ff4cde 100755 (executable)
@@ -4,7 +4,7 @@ PATH=/bin:/usr/bin:/usr/sbin:/sbin:$PATH
 
 #######################################
 # pull in a system config file, if any
-loadconfig() {
+_loadconfig() {
 
     if [ -z "$1" ] ; then
        foo="${service_config:-${service_name}}"
@@ -25,6 +25,10 @@ loadconfig() {
     fi
 }
 
+loadconfig () {
+    _loadconfig "$@"
+}
+
 ##############################################################
 # determine on what type of system (init style) we are running
 detect_init_style() {