diff --git a/userspace/marsadm b/userspace/marsadm index 60249e8e..4d305902 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -155,13 +155,15 @@ sub make_ssh_cmd { } sub ssh_cmd { - my ($peer, $cmd) = @_; + my ($peer, $cmd, $no_fail) = @_; my $ssh = make_ssh_cmd($peer) . " \"$cmd\""; - system $ssh or ldie "SSH to '$peer' command '$cmd' failed\n"; + if (system ($ssh) && defined($no_fail)) { + ldie "SSH to '$peer' command '$cmd' failed\nFull command: '$ssh'\n"; + } } sub rsync_cmd { - my ($peer, $cmd) = @_; + my ($peer, $cmd, $no_fail) = @_; my ($real_peer, $port, $ssh) = make_ssh_cmd($peer, 1); $cmd =~ s/(?