D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Perl NIC subroutine?



On Thu, 2004-02-26 at 12:51, mike@xxxxxxxxxxxxx wrote:
On 26.02.2004 10:11 John Horne wrote:
On Wed, 2004-02-25 at 18:14, Darke, Clive wrote:
There are several options.  Look at gethostbyname, perldoc -f gethostbyname
will give you the doc.  Also look at Net::hostent (standard module), man
Net::hostent contains some examples.

No, that works by using the /etc/hosts or dns. I want something that in
effect looks at 'ifconfig' and says 'lo = 127.0.0.1', 'eth0 = 10.1.2.3',
etc, etc.


Don't you have a look in /etc/sysconfig/network-scripts/ifcfg-eth0, or what ever 
it is called?

No, that's going to be very system specific. Solaris, for example,
doesn't have that setup. I'm looking for a system-independant perl
module/subroutine.

John.

-- 
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 233914
E-mail: John.Horne@xxxxxxxxxxxxxx       Fax: +44 (0)1752 233839



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.



Lynx friendly