ctdb-scripts: Update script boilerplate to avoid shellcheck warnings
[gd/samba/.git] / ctdb / config / events.d / 70.iscsi
index 9e75214e7e32a3abd5b6212874029e17f3227667..7e27a53956461e45b53b40a711e45a26470e8e3c 100755 (executable)
@@ -3,9 +3,9 @@
 # CTDB event script for TGTD based iSCSI
 
 [ -n "$CTDB_BASE" ] || \
-    export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
+    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
 
-. $CTDB_BASE/functions
+. "${CTDB_BASE}/functions"
 
 service_name="iscsi"