Posted on 2006-07-14 15:40:45-07 by cmv in response to 2611
Re: Fails on SunOS with non-fully-qualified NODENAME
Martin- A quick followup on changing Net::Address::Ethernet to use Net::Domain for the hostname, based on my trial modifications of your module:

1.) Depending on configuration, you'll want to do an arp on BOTH the fully qualified and non-fully qualified domain name. The Net::Domain package has both the hostname and hostfqdn calls, which should provide both.

2.) I think you'll want to change your code to try one first, and if that fails, then try the other. On my implementation, I noticed that you saw the STDERR error message when arp fails. I don't know if you want to try and hide that or not.

3.) My implementation went something like this:
my @as = qx{ $ARP hostname }; if($?) { @as = qx{ $ARP hostfqdn }; }

Hope this helps. -Craig
Direct Responses: 2626 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.