If "$1" was empty than loadconfig would load the ctdb config twice.
This stops that from happening.
Signed-off-by: Martin Schwenke <martin@meltin.net>
# pull in a system config file, if any
loadconfig() {
- if [ "$1" != "ctdb" ] ; then
- loadconfig "ctdb"
- fi
-
if [ -z "$1" ] ; then
foo="${service_config:-${service_name}}"
if [ -n "$foo" ] ; then
loadconfig "$foo"
fi
+ elif [ "$1" != "ctdb" ] ; then
+ loadconfig "ctdb"
fi
+
if [ -f /etc/sysconfig/$1 ]; then
. /etc/sysconfig/$1
elif [ -f /etc/default/$1 ]; then