The situation for NFS config has got more complicated and is probably
broken in statd-callout on Debian-like systems at the moment. Allow
several alternative configuration names to be tried. Stop after the
first that is found and loaded.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13860
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
load_system_config ()
{
- if [ -z "$1" ] ; then
- return
- fi
-
- if [ -f "${CTDB_SYS_ETCDIR}/sysconfig/$1" ]; then
- . "${CTDB_SYS_ETCDIR}/sysconfig/$1"
- elif [ -f "${CTDB_SYS_ETCDIR}/default/$1" ]; then
- . "${CTDB_SYS_ETCDIR}/default/$1"
- fi
+ for _i ; do
+
+ if [ -f "${CTDB_SYS_ETCDIR}/sysconfig/${_i}" ]; then
+ . "${CTDB_SYS_ETCDIR}/sysconfig/${_i}"
+ return
+ elif [ -f "${CTDB_SYS_ETCDIR}/default/${_i}" ]; then
+ . "${CTDB_SYS_ETCDIR}/default/${_i}"
+ return
+ fi
+ done
}
# load_script_options [ component script ]