summaryrefslogtreecommitdiff
path: root/ctdb/tools/onnode
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-07-22 16:19:23 +1000
committerAmitay Isaacs <amitay@samba.org>2016-07-25 21:29:46 +0200
commitc3c106e41f4c16a21a11785b47147f89985a8f15 (patch)
tree0c5c5a94ce32743aa0b75bc2c3d372135d3786ef /ctdb/tools/onnode
parentd6e1e69765d532c8519fc82e3f50962e0d526c5b (diff)
downloadsamba-c3c106e41f4c16a21a11785b47147f89985a8f15.tar.gz
ctdb-tools: Simplify "ctdb pnn" output format
Just print the PNN. Update dependent code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tools/onnode')
-rwxr-xr-xctdb/tools/onnode6
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index e7317b75f30..b3efe91c85b 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -199,9 +199,9 @@ get_any_available_node ()
# We do a recursive onnode to find which nodes are up and running.
local out line
out=$("$0" -pq all ctdb pnn 2>&1)
- while read line ; do
- local pnn="${line#PNN:}"
- if [ "$pnn" != "$line" ] ; then
+ while read line ; do
+ if [[ "$line" =~ ^[0-9]+$ ]] ; then
+ local pnn="$line"
# Intentional multi-word expansion
# shellcheck disable=SC2086
echo_nth "$pnn" $all_nodes