1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

ctdb-scripts: Drop node count from "ctdb natgw status" output

Tweak "ctdb natgw natgwlist" to keep output format the same.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke
2016-04-18 15:44:15 +10:00
committed by Amitay Isaacs
parent fadc67cc45
commit 3f3c483196

View File

@ -166,10 +166,7 @@ $natgw_nodes
EOF
# Print status of nodes in $_ns, along with node count
awk -v ns="$_ns" \
'BEGIN { out = "" ; count = 0 } \
ns ~ "@" $2 "@" { out = out "\n" $0 ; count += 1 } \
END { print "Number of nodes:" count out }' <<EOF
awk -v ns="$_ns" 'ns ~ "@" $2 "@" { print $0 }' <<EOF
$nodestatus
EOF
}
@ -177,14 +174,17 @@ EOF
# For backward compatibility
natgwlist ()
{
ret=0
_ret=0
find_master
if [ $? -eq 2 ] ; then
echo "-1 0.0.0.0"
ret=2
_ret=2
fi
nodes_status || return $?
return $ret
_t=$(nodes_status) || return $?
_n=$(echo "$_t" | wc -l)
echo "Number of nodes:${_n}"
echo "$_t"
return $_ret
}
prog=$(basename "$0")