diff options
author | Martin Schwenke <martin@meltin.net> | 2011-05-17 13:20:51 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2011-06-08 14:21:53 +1000 |
commit | 350f3e5b09edf14a8b2ba94d8a8c1dd3329eae26 (patch) | |
tree | f86dc7bff9d242d149814027d0373c1551c372cd /ctdb/tools/onnode | |
parent | 597083d37ab6326adc17046a74858f4b0967446b (diff) | |
download | samba-350f3e5b09edf14a8b2ba94d8a8c1dd3329eae26.tar.gz |
onnode: Be defensive when listing IPs of nodes with designated status.
The current version gives the last item left after stripping the known
fields. If an insufficent number of status fields is stripped then
this would return a residual status field value, which turned out to
be a valid IP address for localhost... so no error occurs.
This change means that the node number is stripped and any residual
status field value will stay appended, causing an error the first time
this command is tested.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 74715e6ec7b67c6f0e863aa51c87279758d6bf91)
Diffstat (limited to 'ctdb/tools/onnode')
-rwxr-xr-x | ctdb/tools/onnode | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode index 264937ea684..7e1b0cac835 100755 --- a/ctdb/tools/onnode +++ b/ctdb/tools/onnode @@ -169,7 +169,7 @@ get_nodes_with_status () # the nth node to get the address. This would make things # more consistent if $ctdb_base/nodes actually contained # hostnames. - nodes="${nodes} ${t##*:}" + nodes="${nodes} ${t#:*:}" fi done |