1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

Tests: eventscripts - fix breakage in some NFS tests

1341329f6125d491b82c873f793af819e677f714 either contains typos or
attempts to influence the test depending on the host system.  Whatever
the cause, a test system (e.g. my laptop) might not have
/etc/sysconfig/nfs, so that can't be used to cause the stub
etc/sysconfig/nfs to be loaded.

We make the tests work by default again, leaving in some flexibility
over configuration file location.

If the goal is to force a Debian-style test mode then:

* The tests are currently probably quite RHEL-centric anyway, so more
  work is probably needed.

* Use an environment variable to indicate the distro test mode and
  make functions like setup_nfs() remove all of the various
  configuration files and create one in the distro-specific location.

I won't do this now... ENOTIME...

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 4aa4a5790ea9ad20e4d25404760c449b358b5260)
This commit is contained in:
Martin Schwenke 2011-11-21 13:44:30 +11:00
parent 4e01fedea5
commit c497e4bc19

View File

@ -460,16 +460,13 @@ rpc_set_service_failure_response ()
# the flexibility to set the number of failures.
_numfails="${2:-${iteration}}"
if [ -f /etc/sysconfig/nfs ]; then
_c="${CTDB_ETCDIR}/sysconfig/nfs"
elif [ -f /etc/default/nfs ]; then
_c="${CTDB_ETCDIR}/default/nfs"
elif [ -f /etc/ctdb/sysconfig/nfs ]; then
_c="${CTDB_ETCDIR}/ctdb/sysconfig/nfs"
fi
if [ -r "$_c" ] ; then
. "$_c"
fi
_etc="$CTDB_ETCDIR" # shortcut for readability
for _c in "$_etc/sysconfig/nfs" "$_etc/default/nfs" "$_etc/ctdb/sysconfig/nfs" ; do
if [ -r "$_c" ] ; then
. "$_c"
break
fi
done
# A handy newline. :-)
_nl="