]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tools: Improve onnode's ShellCheck credibility
authorMartin Schwenke <martin@meltin.net>
Wed, 3 Jun 2020 23:59:59 +0000 (09:59 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 16 Jul 2020 06:51:47 +0000 (06:51 +0000)
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

ctdb/tools/onnode

index a42ff39357430acc8ddc2a6a2377d3a5bb31599d..f2be62e5af48b5b5f622c1a5887778d2c57c8455 100755 (executable)
@@ -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