net telnet mount

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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->login("root", "password");
        print "mounting software \n";
      $t->cmd(String => " mount -F nfs /mnt",
Timeout = 60);
Works just fine.
Except when the target box is switched off!
How can I check that the mount has succeeded please?



Re: net telnet mount

Quoted text here. Click to load it

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().



Re: net telnet mount

Quoted text here. Click to load it
=A0=3D> $host,]
Quoted text here. Click to load it
Ah. My question was not clear. I want too pick up on the situation
when is not reachable. Currently if the nfs mount fails
no error message is generated.

Site Timeline