Only submit 5 user at once because stdin and stdout buffers in net::ssh::perl are too small
This commit is contained in:
parent
885ef93eaf
commit
87751f5bb9
|
@ -203,7 +203,7 @@ else {
|
||||||
while (defined($input = <STDIN>)) {
|
while (defined($input = <STDIN>)) {
|
||||||
$string[$i] .= $input;
|
$string[$i] .= $input;
|
||||||
$j++;
|
$j++;
|
||||||
if ($j==30) {
|
if ($j==5) {
|
||||||
$j=0;
|
$j=0;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
@ -211,8 +211,8 @@ else {
|
||||||
}
|
}
|
||||||
else { $argv = "*test\n"; }
|
else { $argv = "*test\n"; }
|
||||||
my $ssh = Net::SSH::Perl->new($hostname, options=>[
|
my $ssh = Net::SSH::Perl->new($hostname, options=>[
|
||||||
"UserKnownHostsFile /dev/null"
|
"UserKnownHostsFile /dev/null"],
|
||||||
]);
|
protocol => "2,1" );
|
||||||
$ssh->login($username[0], $password);
|
$ssh->login($username[0], $password);
|
||||||
foreach $string2 ( @string ) {
|
foreach $string2 ( @string ) {
|
||||||
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2);
|
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2);
|
||||||
|
|
Loading…
Reference in New Issue