net telnet mount


S

sydneypuente

Hello Guys,
Not sure if this is the correct group tpo post on.
Am using net telnet inside cygwin on my windows laptop to invoke an
NFS mount on a remote solaris box.
print "accessing $host\n";

my $t = new Net::Telnet;
$t->open($host);
$t->login("root", "password");
print "mounting software \n";
$t->cmd(String => " mount -F nfs 192.168.1.18:/expo /mnt",
Timeout = 60);
Works just fine.
Except when the target box is switched off!
How can I check that the mount has succeeded please?

TIA

Syd
 
Ad

Advertisements

P

Peter Wyzl

Hello Guys,
Not sure if this is the correct group tpo post on.
Am using net telnet inside cygwin on my windows laptop to invoke an
NFS mount on a remote solaris box.
print "accessing $host\n";

my $t = new Net::Telnet;
$t->open($host);
$t->login("root", "password");
print "mounting software \n";
$t->cmd(String => " mount -F nfs 192.168.1.18:/expo /mnt",
Timeout = 60);
Works just fine.
Except when the target box is switched off!
How can I check that the mount has succeeded please?

From the Net::Telnet docs re: open

open - connect to port on remote host


$ok = $obj->open($host); $ok = $obj->open([Host => $host,]
[Port => $port,]
[Errmode => $mode,]
[Timeout => $secs,]);This method opens a TCP connection
to $port on $host. If either argument is missing then the current value of
host() or port() is used. Optional named parameters are provided to override
the current setting of errmode and timeout.

On success 1 is returned. On time-out or other connection failures, the
error mode action is performed. See errmode().

HTH, HAND

P
 
Ad

Advertisements

S

sydneypuente

Hello Guys,
Not sure if this is the correct group tpo post on.
Am using net telnet inside cygwin on my windows laptop to invoke an
NFS mount on a remote solaris box.
       print "accessing $host\n";
       my $t = new Net::Telnet;
       $t->open($host);
       $t->login("root", "password");
       print "mounting software \n";
     $t->cmd(String => " mount -F nfs 192.168.1.18:/expo /mnt",
Timeout = 60);
Works just fine.
Except when the target box is switched off!
How can I check that the mount has succeeded please?

From the Net::Telnet docs re: open

open - connect to port on remote host

    $ok = $obj->open($host);    $ok = $obj->open([Host    => $host,]
                     [Port    => $port,]
                     [Errmode => $mode,]
                     [Timeout => $secs,]);This method opens a TCP connection
to $port on $host. If either argument is missing then the current value of
host() or port() is used. Optional named parameters are provided to override
the current setting of errmode and timeout.

On success 1 is returned. On time-out or other connection failures, the
error mode action is performed. See errmode().

HTH, HAND

P
Ah. My question was not clear. I want too pick up on the situation
when 192.168.1.18 is not reachable. Currently if the nfs mount fails
no error message is generated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top