]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Fix CTDB_BASE to allow event scripts to run standalone
authoryogita72 <yogita.bijani@gmail.com>
Tue, 4 Feb 2025 02:05:11 +0000 (02:05 +0000)
committerMartin Schwenke <martins@samba.org>
Wed, 19 Feb 2025 02:43:44 +0000 (02:43 +0000)
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

20 files changed:
ctdb/config/events/legacy/00.ctdb.script
ctdb/config/events/legacy/01.reclock.script
ctdb/config/events/legacy/05.system.script
ctdb/config/events/legacy/10.interface.script
ctdb/config/events/legacy/11.natgw.script
ctdb/config/events/legacy/11.routing.script
ctdb/config/events/legacy/13.per_ip_routing.script
ctdb/config/events/legacy/20.multipathd.script
ctdb/config/events/legacy/31.clamd.script
ctdb/config/events/legacy/40.vsftpd.script
ctdb/config/events/legacy/41.httpd.script
ctdb/config/events/legacy/46.update-keytabs.script
ctdb/config/events/legacy/47.samba-dcerpcd.script
ctdb/config/events/legacy/48.netbios.script
ctdb/config/events/legacy/49.winbind.script
ctdb/config/events/legacy/50.samba.script
ctdb/config/events/legacy/60.nfs.script
ctdb/config/events/legacy/70.iscsi.script
ctdb/config/events/legacy/91.lvs.script
ctdb/config/events/legacy/95.database.script

index 0c73f80c6aa07b0138d2258063d24c37b9e316c4..58f98d5ecaf739d88ffcb71d945aaecf8f706c27 100755 (executable)
@@ -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"
 
index 04068750efaa4d573c9ac843d30614f2fb74a13b..14530bf8301c5bf7444f92c68054c2e4f977c875 100755 (executable)
@@ -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"
 
index bf36dd21ffa7bc569145942d572d4172875c2d5d..47f3acbce4461b1afd69db5ffcfc1911956833a8 100755 (executable)
@@ -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"
 
index 8d2d6968a1db41f654fd868014f2c8dbdbab83d7..cb7c958ec95f7dc6d2379011ba2a8463abecb4c6 100755 (executable)
@@ -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"
 
index fb93dea6d5eaed66b2ebcaed14048ab585e44ee7..ca81a37627382f6549175f6f27f84b1438631e56 100755 (executable)
@@ -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"
 
index 7ba7f3bf4a8a07d9f292f3f05e5ee463eaa3f4f8..a6abf594df3a818b9d4b82afec7e1f017ae5f34b 100755 (executable)
@@ -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"
 
index d7949c6dedb7ec0e68e9c4c0ea2322396d2749d1..fa358bae058c5e90390eea09bfdd6e6f16fb90a5 100755 (executable)
@@ -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"
 
index a420251d92ca2e98ce2eb99c341e6d55ef69f8af..74edcb5abf42eb44aafa6cb7b39118f9c1269276 100755 (executable)
@@ -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"
 
index 5d60fe3aa375ea5afb3a9a50715075f312493af8..966f63cc30ab467016f6026421c01acae900ded2 100755 (executable)
@@ -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"
 
index 2d2aac470339f4b2a0db4b300871cf79a748e5d6..6497c715888e08d08dce6f7b63b82d6518a0c2b4 100755 (executable)
@@ -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"
 
index dd90aeda274b95bebbf4cd4acb00fb264341f928..51d85947ff3ca0c898b54aa5ea69e95ad458e639 100755 (executable)
@@ -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"
 
index f207a7b6a8ffaee85e53f0aff9acad2d01a33273..fa89af7a172201dc17d5a9de84665892dd63a1b5 100755 (executable)
@@ -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)
index 9492d553a621abb0430c789a266c38a4ab67f63a..fae9ee9f0f020e08630b1952d39cbfca09548ea8 100755 (executable)
@@ -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"
 
index 1531e4919dee48a1364ef2a65e0f64dca5474751..ed0f871f939b468b7453ad3eaae8cf21abd9b931 100755 (executable)
@@ -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"
 
index 852b54165cff2b140fb0d0bc340e7d754a4c81a3..999353e2d8dec1ed42348b4e92530a80364f7929 100755 (executable)
@@ -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"
 
index c9d34cd2245ed7583e37ccd1c3360c8758227e37..41864d59e80b57b8332578ecf391a7bf9ba2f8aa 100755 (executable)
@@ -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"
 
index b797ada9370b6d239e187188cdd8546d157db29c..c59a0c18ea85e7faa4138e71fda6454d9d2925da 100755 (executable)
@@ -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"
 
index e74651d8eb1b51daedfa88f99b00a5009e2e68f0..72069f0930ec2c06e373bc48efdef37cb6e686fe 100755 (executable)
@@ -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"
 
index 885506873a0b3c0cd3acec015e57a232a628a922..b532194fd60a2672433fff7138ede96df99d65f5 100755 (executable)
@@ -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"
 
index e2627c6c1d04ff49ba91da5659463d67aa555d75..1b15e26ddaf249f0a896c675cedf70878483cdfb 100755 (executable)
@@ -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"