|
Posted by Ben Morrow on February 17, 2008, 1:39 am
Please log in for more thread options
>
> I am attempting to use Net::Ping as part of a script to validate
> entries in our automount maps. To speed the process of checking the
> mount points, I am using Net::Ping to contact the nfs server to make
> sure it is up. I know there are a few entries that reference NFS
> servers that have been decommissioned, which is causing me problems.
>
> When I try to do a $p->ack($host) and the hostname isn't registered in
> DNS Net::Ping dies. Is there a trick to get the ack method to not kill
> my script when the hostname lookup fails?
I can't see any reason that should happen. Can you post a (minimal)
complete script, together with expected and actual output?
In general, if a function is dieing when you don't want it to you avoid
this by wrapping the call in eval {}, but Net::Ping->ack shouldn't die
under normal circumstances.
Ben
|