Merge pull request #734 from Gryd3/patch-1
append a rand int to the socket name.
This commit is contained in:
commit
b0a71f763a
2
syncoid
2
syncoid
|
@ -1473,7 +1473,7 @@ sub getssh {
|
||||||
if ($rhost ne "") {
|
if ($rhost ne "") {
|
||||||
if ($remoteuser eq 'root' || $args{'no-privilege-elevation'}) { $isroot = 1; } else { $isroot = 0; }
|
if ($remoteuser eq 'root' || $args{'no-privilege-elevation'}) { $isroot = 1; } else { $isroot = 0; }
|
||||||
# now we need to establish a persistent master SSH connection
|
# now we need to establish a persistent master SSH connection
|
||||||
$socket = "/tmp/syncoid-$rhost-" . time();
|
$socket = "/tmp/syncoid-$rhost-" . time() . "-" . int(rand(10000));
|
||||||
|
|
||||||
open FH, "$sshcmd -M -S $socket -o ControlPersist=1m $args{'sshport'} $rhost exit |";
|
open FH, "$sshcmd -M -S $socket -o ControlPersist=1m $args{'sshport'} $rhost exit |";
|
||||||
close FH;
|
close FH;
|
||||||
|
|
Loading…
Reference in New Issue