diff options
author | Martin Schwenke <martin@meltin.net> | 2010-01-22 17:19:12 +1100 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2010-01-22 17:19:12 +1100 |
commit | 56b178e1a2109a2dca52e2140db060bd091b1458 (patch) | |
tree | 377816280cc0b85a280510f0ec271f3a663f020a /ctdb/config | |
parent | 407a8f720581f624a0c519b97d9f7e0bde02d524 (diff) | |
download | samba-56b178e1a2109a2dca52e2140db060bd091b1458.tar.gz samba-56b178e1a2109a2dca52e2140db060bd091b1458.tar.xz samba-56b178e1a2109a2dca52e2140db060bd091b1458.zip |
eventscripts: stop loadconfig function from loading ctdb config file twice.
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>
(This used to be ctdb commit 0406d406da70aaee7ad6aac236114905c5d03ed2)
Diffstat (limited to 'ctdb/config')
-rw-r--r-- | ctdb/config/functions | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions index 32d6d98ac5..531f85937d 100644 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -6,17 +6,16 @@ PATH=/bin:/usr/bin:/usr/sbin:/sbin:$PATH # 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 |