1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-scripts: Rename variable CTDB_ETCDIR to CTDB_SYS_ETCDIR

This variable points to /etc/ by default.

This distinguishes it from the different variable from wscript, which
points to /etc/ctdb/.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Martin Schwenke 2015-08-17 14:12:15 +10:00 committed by Michael Adam
parent 014a1eb540
commit 121d1a8571
7 changed files with 20 additions and 20 deletions

View File

@ -95,7 +95,7 @@ ipv4_host_addr_to_net ()
ensure_rt_tables ()
{
rt_tables="$CTDB_ETCDIR/iproute2/rt_tables"
rt_tables="$CTDB_SYS_ETCDIR/iproute2/rt_tables"
# This file should always exist. Even if this didn't exist on the
# system, adding a route will have created it. What if we startup

View File

@ -15,8 +15,8 @@ if [ -z "$CTDB_SCRIPT_VARDIR" ] ; then
CTDB_SCRIPT_VARDIR="/usr/local/var/lib/ctdb/state"
fi
if [ -z "$CTDB_ETCDIR" ] ; then
CTDB_ETCDIR="/etc"
if [ -z "$CTDB_SYS_ETCDIR" ] ; then
CTDB_SYS_ETCDIR="/etc"
fi
#######################################
@ -39,10 +39,10 @@ _loadconfig() {
return
fi
if [ -f $CTDB_ETCDIR/sysconfig/$1 ]; then
. $CTDB_ETCDIR/sysconfig/$1
elif [ -f $CTDB_ETCDIR/default/$1 ]; then
. $CTDB_ETCDIR/default/$1
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
elif [ -f $CTDB_BASE/sysconfig/$1 ]; then
. $CTDB_BASE/sysconfig/$1
fi
@ -183,10 +183,10 @@ _service ()
$_nice /sbin/service "$_service_name" "$_op"
elif [ -x /usr/sbin/service ]; then
$_nice /usr/sbin/service "$_service_name" "$_op"
elif [ -x $CTDB_ETCDIR/init.d/$_service_name ]; then
$_nice $CTDB_ETCDIR/init.d/$_service_name "$_op"
elif [ -x $CTDB_ETCDIR/rc.d/init.d/$_service_name ]; then
$_nice $CTDB_ETCDIR/rc.d/init.d/$_service_name "$_op"
elif [ -x $CTDB_SYS_ETCDIR/init.d/$_service_name ]; then
$_nice $CTDB_SYS_ETCDIR/init.d/$_service_name "$_op"
elif [ -x $CTDB_SYS_ETCDIR/rc.d/init.d/$_service_name ]; then
$_nice $CTDB_SYS_ETCDIR/rc.d/init.d/$_service_name "$_op"
fi
}

View File

@ -1498,7 +1498,7 @@ CTDB_SET_MonitorInterval=20
</varlistentry>
<varlistentry>
<term>CTDB_ETCDIR=<parameter>DIRECTORY</parameter></term>
<term>CTDB_SYS_ETCDIR=<parameter>DIRECTORY</parameter></term>
<listitem>
<para>
DIRECTORY containing system configuration files. This is

View File

@ -9,7 +9,7 @@ setup_samba
export FAKE_TESTPARM_FAIL="yes"
required_result 1 <<EOF
ERROR: smb.conf cache create failed - testparm failed with:
Load smb config files from ${CTDB_ETCDIR}/samba/smb.conf
Load smb config files from ${CTDB_SYS_ETCDIR}/samba/smb.conf
rlimit_max: increasing rlimit_max (2048) to minimum Windows limit (16384)
Processing section "[1_existing]"
Processing section "[2_existing]"

View File

@ -12,7 +12,7 @@ simple_test
export FAKE_TESTPARM_FAIL="yes"
required_result 1 <<EOF
WARNING: smb.conf cache update failed - using old cache file
Load smb config files from ${CTDB_ETCDIR}/samba/smb.conf
Load smb config files from ${CTDB_SYS_ETCDIR}/samba/smb.conf
rlimit_max: increasing rlimit_max (2048) to minimum Windows limit (16384)
Processing section "[1_existing]"
Processing section "[2_existing]"

View File

@ -33,9 +33,9 @@ touch "${CTDB_LOGGING#file:}" || \
if [ -d "${TEST_SUBDIR}/etc" ] ; then
cp -a "${TEST_SUBDIR}/etc" "$EVENTSCRIPTS_TESTS_VAR_DIR"
export CTDB_ETCDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/etc"
export CTDB_SYS_ETCDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/etc"
else
die "Unable to setup \$CTDB_ETCDIR"
die "Unable to setup \$CTDB_SYS_ETCDIR"
fi
if [ -d "${TEST_SUBDIR}/etc-ctdb" ] ; then
@ -881,7 +881,7 @@ rpc_services_up ()
nfs_load_config ()
{
_etc="$CTDB_ETCDIR" # shortcut for readability
_etc="$CTDB_SYS_ETCDIR" # shortcut for readability
for _c in "$_etc/sysconfig/nfs" "$_etc/default/nfs" "$_etc/ctdb/sysconfig/nfs" ; do
if [ -r "$_c" ] ; then
. "$_c"
@ -1166,7 +1166,7 @@ simple_test ()
##################################################
CTDB_BASE="$CTDB_BASE"
CTDB_ETCDIR="$CTDB_ETCDIR"
CTDB_SYS_ETCDIR="$CTDB_SYS_ETCDIR"
ctdb client is "$(which ctdb)"
ip command is "$(which ip)"
EOF

View File

@ -9,7 +9,7 @@ not_implemented ()
error ()
{
cat >&2 <<EOF
Load smb config files from ${CTDB_ETCDIR}/samba/smb.conf
Load smb config files from ${CTDB_SYS_ETCDIR}/samba/smb.conf
rlimit_max: increasing rlimit_max (2048) to minimum Windows limit (16384)
EOF
@ -68,7 +68,7 @@ if [ -n "$file" ] ; then
cat "$file"
else
# We force our own smb.conf and add the shares.
cat "${CTDB_ETCDIR}/samba/smb.conf"
cat "${CTDB_SYS_ETCDIR}/samba/smb.conf"
for i in $FAKE_SHARES ; do
bi=$(basename "$i")