summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2020-06-04 09:59:59 +1000
committerAmitay Isaacs <amitay@samba.org>2020-07-16 06:51:47 +0000
commit0e287127cb8d8ce93abb99ea32b146b9392b56bc (patch)
tree323c1fcc1b2ad0b0da30aade5caba6e76df4cbcb /ctdb
parent5f217d60376226d323e9d86ed094a27b7e7fa4b8 (diff)
downloadsamba-0e287127cb8d8ce93abb99ea32b146b9392b56bc.tar.gz
ctdb-tools: Improve onnode's ShellCheck credibility
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu Jul 16 06:51:47 UTC 2020 on sn-devel-184
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/tools/onnode4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index a42ff393574..f2be62e5af4 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -154,7 +154,7 @@ get_nodes_with_status ()
(
local i
IFS="${IFS}|"
- while IFS="" read i ; do
+ while IFS="" read -r i ; do
# Intentional word splitting
# shellcheck disable=SC2086
@@ -193,7 +193,7 @@ 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
+ while read -r line ; do
if [[ "$line" =~ ^[0-9]+$ ]] ; then
local pnn="$line"
# Intentional multi-word expansion