Hi,
How to use a solaris mount command in perl?
I tried that telnet to the solaris machine.
For that solaris machine, how can I give the username and password?
[CODE=perl]
use Net::Telnet;
use strict;
my $cmd = shift;
my $ip1 = shift;
my $ip2 = shift;
my $vol = shift;
my $mntpnt = shift;
print "command name is $cmd\n";
print "$ip1\n";
print "$ip2\n";
print "$vol\n";
print "$mntpnt\n" ;
my $t = new Net::Telnet(
Timeout => 300,
rrmode => 'die',
);
$t->open("$ip2") ;
my @file=$t->cmd("mount") ;
print "@file";
[/CODE]
Where I am wrong?
please guide me.
Thanks and Regards,
susi.
How to use a solaris mount command in perl?
I tried that telnet to the solaris machine.
For that solaris machine, how can I give the username and password?
[CODE=perl]
use Net::Telnet;
use strict;
my $cmd = shift;
my $ip1 = shift;
my $ip2 = shift;
my $vol = shift;
my $mntpnt = shift;
print "command name is $cmd\n";
print "$ip1\n";
print "$ip2\n";
print "$vol\n";
print "$mntpnt\n" ;
my $t = new Net::Telnet(
Timeout => 300,
rrmode => 'die',
);
$t->open("$ip2") ;
my @file=$t->cmd("mount") ;
print "@file";
[/CODE]
Where I am wrong?
please guide me.
Thanks and Regards,
susi.
Comment