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>
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
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
#######################################
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
$_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
}
</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
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]"
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]"
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
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"
##################################################
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
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
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")