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
 
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
 
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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top