1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

ctdb-scripts: Fix CTDB_BASE to allow event scripts to run standalone

commit 12fd8d7a5c5d14d403aac6cd9e318afcd0a8e159 broke this when it moved the eventscripts
 down a subdirectory without changing this boilerplate.

Signed-off-by: yogita72 <yogita.bijani@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Feb 19 02:43:44 UTC 2025 on atb-devel-224
This commit is contained in:
yogita72 2025-02-04 02:05:11 +00:00 committed by Martin Schwenke
parent a814f5d90a
commit 7f3222d004
20 changed files with 20 additions and 20 deletions

View File

@ -4,7 +4,7 @@
# elsewhere.
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# script to check accessibility to the reclock file on a node
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# ctdb event script for checking local file system utilization
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -4,7 +4,7 @@
# interfaces used by public IP addresses.
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -6,7 +6,7 @@
#
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -18,7 +18,7 @@
# bond1 10.3.3.0/24 10.0.0.1
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -1,7 +1,7 @@
#!/bin/sh
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -7,7 +7,7 @@
#
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# event script to manage clamd in a cluster environment
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# event strict to manage vsftpd in a cluster environment
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# event script to manage httpd in a cluster environment
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# script to update keytab
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
case "$1" in
recovered)

View File

@ -2,7 +2,7 @@
# ctdb event script for SAMBA DCERPCD Services
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# ctdb event script for Netbios Name Services
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# ctdb event script for winbind
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# ctdb event script for Samba
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# script to manage nfs in a clustered environment
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -3,7 +3,7 @@
# CTDB event script for TGTD based iSCSI
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -2,7 +2,7 @@
# script to manage the lvs ip multiplexer for a single public address cluster
[ -n "$CTDB_BASE" ] || \
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"

View File

@ -4,7 +4,7 @@
# elsewhere.
[ -n "$CTDB_BASE" ] ||
CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
CTDB_BASE=$(d="$(dirname "$0")" && cd -P "$d/../../" && pwd)
. "${CTDB_BASE}/functions"