Hi,
 
I am Shivageeta S. Choodi, working for Novell, Bangalore in system
testing group. 
 
I have used Perl for the test automation. I am facing a problem in
telnet module of Perl. The problem details are as follows and the script
(around 10 lines) is also attached. 
 
_____________________________________________________________________
Problem description:
 
Test machine: Running the script from a SLES 8 machine
 
The script : is attached. It does telnet to a machine (hard coded in
the script), and a create a file /my-Perl after the successful telnet.
 
Problem: If the host specified in the script is SUSE/SLES machine, the
script hangs. But the same script works fine if I change the host to
some other Unix/Linux hosts for example RH Linux/Solaris. I am also able
to manually telnet to the SUSE/SLES boxes (for which the script is
hanging during the telnet operation).
 
Perl telnet module: Net-Telnet-3.03
______________________________________________________________________

The Code:

#!/usr/bin/perl
#use Time::Format;
BEGIN
{
push(@INC,'/usr/lib/perl5/site_perl/5.8.0/URI/');
}
require "Telnet.pm";

#Initialise telnet
$telnet = new Net::Telnet->new( Timeout=>20,Prompt => '/[\$%#>] $/');
die &Log_Message("Can't open telnet session to the remote host") unless
$telnet;

#Telnet and login to a remote machine
$telnet->open("systst-lnx-15");
$telnet->login("root","novell");
print "Logged into the system \n";

#After a successful telnet create the file /my-perl at the remote
host.
$telnet->cmd("touch /my-perl");

$telnet->close;

____________________________________________________________________________________

 
Can you please let me know is there any problem with the perl telnet
module which have installed?
I request you to help me in solving this problem (i.e. the script
should be able successfully telnet to a SUSE/SLES machine and create a
file).
 

 
With Regards,
Shivageeta
 

Reply via email to