diff options
author | Martin Schwenke <martin@meltin.net> | 2016-07-22 16:19:23 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-07-25 21:29:46 +0200 |
commit | c3c106e41f4c16a21a11785b47147f89985a8f15 (patch) | |
tree | 0c5c5a94ce32743aa0b75bc2c3d372135d3786ef /ctdb/tools/onnode | |
parent | d6e1e69765d532c8519fc82e3f50962e0d526c5b (diff) | |
download | samba-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-x | ctdb/tools/onnode | 6 |
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 |