fff88940f71058e4eefd65f50a6701389c005c17 introduced a regression.
Without $service_name set by default, the CTDB configuration is no
longer loaded when loadconfig() is called without any arguments.
That's bad.
Signed-off-by: Martin Schwenke <martin@meltin.net>
foo="${service_config:-${service_name}}"
if [ -n "$foo" ] ; then
loadconfig "$foo"
+ return
fi
- elif [ "$1" != "ctdb" ] ; then
+ fi
+
+ if [ "$1" != "ctdb" ] ; then
loadconfig "ctdb"
fi
+ if [ -z "$1" ] ; then
+ return
+ fi
+
if [ -f $CTDB_ETCDIR/sysconfig/$1 ]; then
. $CTDB_ETCDIR/sysconfig/$1
elif [ -f $CTDB_ETCDIR/default/$1 ]; then