ctdb-scripts: Update script boilerplate to avoid shellcheck warnings
[gd/samba/.git] / ctdb / config / events.d / 13.per_ip_routing
index cfcd484a8c85ddc0e9c4960cffb2ab1bff5c398e..5085f37c88ad1bc9bf60c7a4ac64b23603bcc58c 100755 (executable)
@@ -1,9 +1,10 @@
 #!/bin/sh
 
 [ -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
 loadconfig
 
 service_name=per_ip_routing