[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Thu Jul 16 06:52:02 UTC 2020


The branch, master has been updated
       via  0e287127cb8 ctdb-tools: Improve onnode's ShellCheck credibility
       via  5f217d60376 ctdb-tools: Allow onnode -P to respect ONNODE_SSH
       via  00eb88b241c ctdb-tools: Whitespace fixups
       via  bc174243d78 ctdb-tools: Drop undocumented ONNODE_SSH_OPTS variable
      from  d8f1d267cde util: Fix a signed/unsigned comparison

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0e287127cb8d8ce93abb99ea32b146b9392b56bc
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 4 09:59:59 2020 +1000

    ctdb-tools: Improve onnode's ShellCheck credibility
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Thu Jul 16 06:51:47 UTC 2020 on sn-devel-184

commit 5f217d60376226d323e9d86ed094a27b7e7fa4b8
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 4 09:58:41 2020 +1000

    ctdb-tools: Allow onnode -P to respect ONNODE_SSH
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 00eb88b241c1451b23fdd86ec8a391c07a20fa2a
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 4 09:48:03 2020 +1000

    ctdb-tools: Whitespace fixups
    
    Drop some unnecessary whitespace and re-indent push().
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit bc174243d789e95f9f4487f08a0998787e64f0d4
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jun 4 09:45:26 2020 +1000

    ctdb-tools: Drop undocumented ONNODE_SSH_OPTS variable
    
    Options can be set in ONNODE_SSH, so this variable is unnecessary.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/tools/onnode | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index 35c46c3c779..f2be62e5af4 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -14,12 +14,12 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-   
+
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-   
+
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
@@ -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
@@ -254,19 +254,19 @@ get_nodes ()
 	done
 }
 
-push()
+push ()
 {
-    local host="$1"
-    local files="$2"
-
-    local f
-    for f in $files ; do
-        $verbose && echo "Pushing $f"
-        case "$f" in
-	    /*) rsync "$f" "[${host}]:${f}" ;;
-	    *)  rsync "${PWD}/${f}" "[${host}]:${PWD}/${f}" ;;
-	esac
-    done
+	local host="$1"
+	local files="$2"
+
+	local f
+	for f in $files ; do
+		$verbose && echo "Pushing $f"
+		case "$f" in
+		/*) rsync "$f" "[${host}]:${f}" ;;
+		*)  rsync "${PWD}/${f}" "[${host}]:${PWD}/${f}" ;;
+		esac
+	done
 }
 
 ######################################################################
@@ -275,8 +275,10 @@ parse_options "$@"
 
 ssh_opts=
 if $push ; then
+	if [ -n "$ONNODE_SSH" ] ; then
+		export RSYNC_RSH="$ONNODE_SSH"
+	fi
 	ONNODE_SSH=push
-	ONNODE_SSH_OPTS=""
 else
 	$current && command="cd $PWD && $command"
 
@@ -313,7 +315,7 @@ retcode=0
 for n in $nodes ; do
 	set -o pipefail 2>/dev/null
 
-	ssh_cmd="$ONNODE_SSH $ssh_opts $ONNODE_SSH_OPTS"
+	ssh_cmd="$ONNODE_SSH $ssh_opts"
 	if $parallel ; then
 		if $verbose ; then
 			$ssh_cmd "$n" "$command" 2>&1 | sed -e "s@^@[$n] @"


-- 
Samba Shared Repository



More information about the samba-cvs mailing list