ctdb-tools: Detect unknown node number
authorMartin Schwenke <martin@meltin.net>
Fri, 12 Oct 2018 03:41:42 +0000 (14:41 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:14 +0000 (07:16 +0100)
commit1bbc4fad434a850565fb4f74e529f8824840988a
tree2da9441e8d4f73902471462758f12908202a8a9a
parent08469408c379e37523e76a07ac7264bded1dbf01
ctdb-tools: Detect unknown node number

If there aren't enough addresses in the list then the shift will
silently fail and the printed address will be the unshifted value of
$1, which is incorrect/unexpected.  So, sanity check the node number.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/onnode/0010.sh [new file with mode: 0755]
ctdb/tests/onnode/0011.sh [new file with mode: 0755]
ctdb/tools/onnode