diff --git a/ctdb/config/ctdb-crash-cleanup.sh b/ctdb/config/ctdb-crash-cleanup.sh index 420db76727b..f7ccfc8b732 100755 --- a/ctdb/config/ctdb-crash-cleanup.sh +++ b/ctdb/config/ctdb-crash-cleanup.sh @@ -22,7 +22,7 @@ ctdb status 2>/dev/null && { exit 0 } -(cat /etc/sysconfig/ctdb | egrep "^CTDB_NATGW_PUBLIC_IP" | sed -e "s/.*=//" -e "s/\/.*//";cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1) | while read _IP; do +(cat /etc/{sysconfig,default}/ctdb | egrep "^CTDB_NATGW_PUBLIC_IP" | sed -e "s/.*=//" -e "s/\/.*//";cat "$CTDB_PUBLIC_ADDRESSES" | cut -d/ -f1) | while read _IP; do _IP_HELD=`/sbin/ip addr show | grep "inet $_IP/"` [ -z "$_IP_HELD" ] || { _IFACE=`echo $_IP_HELD | sed -e "s/.*\s//"` diff --git a/ctdb/tests/complex/31_nfs_tickle.sh b/ctdb/tests/complex/31_nfs_tickle.sh index 030e34fe023..dcbd4d77b20 100755 --- a/ctdb/tests/complex/31_nfs_tickle.sh +++ b/ctdb/tests/complex/31_nfs_tickle.sh @@ -83,7 +83,13 @@ sleep_for "${out#*= }" if try_command_on_node any "test -r /etc/ctdb/events.d/61.nfstickle" ; then echo "Trying to determine NFS_TICKLE_SHARED_DIRECTORY..." - f="/etc/sysconfig/nfs" + if [ -f /etc/sysconfig/nfs ]; then + f="/etc/sysconfig/nfs" + elif [ -f /etc/default/nfs ]; then + f="/etc/default/nfs" + elif [ -f /etc/ctdb/sysconfig/nfs ]; then + f="/etc/ctdb/sysconfig/nfs" + fi try_command_on_node -v any "[ -r $f ] && sed -n -e s@^NFS_TICKLE_SHARED_DIRECTORY=@@p $f" || true nfs_tickle_shared_directory="${out:-/gpfs/.ctdb/nfs-tickles}" diff --git a/ctdb/tests/eventscripts/common.sh b/ctdb/tests/eventscripts/common.sh index 9003b396c20..a79c293e01f 100644 --- a/ctdb/tests/eventscripts/common.sh +++ b/ctdb/tests/eventscripts/common.sh @@ -460,7 +460,13 @@ rpc_set_service_failure_response () # the flexibility to set the number of failures. _numfails="${2:-${iteration}}" - _c="${CTDB_ETCDIR}/sysconfig/nfs" + 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