From: Martin Schwenke Date: Tue, 14 May 2013 04:56:26 +0000 (+1000) Subject: eventscripts: Fix regression in _loadconfig() X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=f1619a36c1beba11533052dc5728fa3adaa08870;p=obnox%2Fctdb.git eventscripts: Fix regression in _loadconfig() 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 --- diff --git a/config/functions b/config/functions index 4f31d840..5778420f 100755 --- a/config/functions +++ b/config/functions @@ -23,11 +23,18 @@ _loadconfig() { 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