diff options
| author | Martin Schwenke <martin@meltin.net> | 2013-05-14 14:56:26 +1000 |
|---|---|---|
| committer | Amitay Isaacs <amitay@gmail.com> | 2013-05-22 14:24:21 +1000 |
| commit | 51dbaecb543344496fd48357654fbbfebeccb8af (patch) | |
| tree | 67cdccca8b37c279e57ea999e3348c11f282ccfb | |
| parent | ff9831f5b1279266469fee0d81a629b3ce584d4e (diff) | |
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 <martin@meltin.net>
(This used to be ctdb commit f1619a36c1beba11533052dc5728fa3adaa08870)
| -rwxr-xr-x | ctdb/config/functions | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions index 4f31d84080..5778420f08 100755 --- a/ctdb/config/functions +++ b/ctdb/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 |
