Hello!
I am configuring a new NCM family with SSH connection. Everything has been working ok until the upload running script.I have used other script like the HP_Procuve or Cisco NX OS Upload_Script , and the mistake is the same all time.
By the message I suppose that the error in the script is in the lines followings which I have promintented in bold. But this part I always have used and never have this mistake
$ssh->timeout( $upload_timeout );
for my $c( @contentData )
{
chomp( $c );
my $RcvData = $ssh->exec( $c );
if( ( ( "$RcvData" =~ /\s?%\s/ ) &&
( "$RcvData" !~ /% Duplicate remark statement/ ) ) ||
( "$RcvData" =~ /Syntax Error|Script Error/ ) )
{
$msg = "Upload failed on command: '" . $c . "'\n" . $RcvData;
$ssh->close();
return( 246, $msg );
}
#sleep $upload_timeout;
}
$msg = "Success";
$ssh->close();
return( 0, $msg );
Anyone have had a similar problem?
Saludos,
Susana