summaryrefslogtreecommitdiffstats
path: root/ctdb/config/functions
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-08-05 15:12:14 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-08-14 15:57:04 +1000
commitb1f7337d2bf6666edb9feeab5b6be2374e765271 (patch)
tree2399f36b9f42c8742dba3c39bed3d147c18ae928 /ctdb/config/functions
parent0ca046577f87b2d12403a7e40ea36994fa553340 (diff)
downloadsamba-b1f7337d2bf6666edb9feeab5b6be2374e765271.tar.gz
samba-b1f7337d2bf6666edb9feeab5b6be2374e765271.tar.xz
samba-b1f7337d2bf6666edb9feeab5b6be2374e765271.zip
eventscripts: New configuration variable $CTDB_RPCINFO_LOCALHOST
Passing "localhost" to the rpcinfo command causes overheads, like reading /etc/services multiple times. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1d61988af9e4fa3621a3e2d06a859bcb53df2d67)
Diffstat (limited to 'ctdb/config/functions')
-rwxr-xr-xctdb/config/functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions
index d9c8a219305..087c6efb642 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -408,7 +408,9 @@ ctdb_check_rpc ()
progname="$1"
version="$2"
- if ! ctdb_check_rpc_out=$(rpcinfo -u localhost $progname $version 2>&1) ; then
+ _localhost="${CTDB_RPCINFO_LOCALHOST:-127.0.0.1}"
+
+ if ! ctdb_check_rpc_out=$(rpcinfo -u $_localhost $progname $version 2>&1) ; then
ctdb_check_rpc_out="ERROR: $progname failed RPC check:
$ctdb_check_rpc_out"
echo "$ctdb_check_rpc_out"