diff options
Diffstat (limited to 'ctdb/tools/onnode')
-rwxr-xr-x | ctdb/tools/onnode | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index eabe034d227..13b0d19b3ee 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -102,8 +102,12 @@ echo_nth () { local n="$1" ; shift - shift "$n" - local node="$1" + # Note that this is 0-based + local node="" + if [ "$n" -le $# ] ; then + shift "$n" + node="$1" + fi if [ -n "$node" -a "$node" != "#DEAD" ] ; then echo "$node" |