I used perl::Net:IPv4Addr in order to be able to parse /usr/bin/ip (as ifconfig
output is not reliable anymore).
The output of the ip command uses cidr netmasks and I need to convert cidr
netmask to std netmasks. (example: parse 10.8.64.23/22 and get 10.8.64.23 and
255.255.252.0)
The module is available on rhel6 (epel repo), fedora at least 17+, ubuntu 12.04+
deb package: libnetwork-ipv4addr-perl
rpm package: perl-Net-IPv4Addr
Regards,
PS: I've seen that perl-Net-IP is also available on all platforms, but I ccan't
tell if there is a function that also permit to parse cidr netmasks.(this
module seems far more complete, but right now I can't tell if it's usefull to
me). We can change that later if relevant.
Olivier.
--
Olivier LAHAYE
CEA DRT/LIST/DM2I/DIR
________________________________
De : DongInn Kim [di...@cs.indiana.edu]
Date d'envoi : mardi 1 octobre 2013 19:02
À : oscar-devel@lists.sourceforge.net
Objet : Re: [Oscar-devel] set_node_nics now uses ip instead of ifconfig.
Hi Olivier,
Is perl::Net::IPv4Addr module a build-in one in most distros? It seems that it
is not available in my MacBookPro. Yes, we can install the package containing
the perl module.
ftp://rpmfind.net/linux/epel/6/x86_64/perl-Net-IPv4Addr-0.10-6.el6.noarch.rpm
So, does this perl module do some better job than using "ifconfig" or "ip"?
Is this for getting a mac address or such?
Regards,
--
- DongInn
On Oct 1, 2013, at 12:39 PM, LAHAYE Olivier
<olivier.lah...@cea.fr<mailto:olivier.lah...@cea.fr>> wrote:
Hi,
I've hopefully fixed set_node_nics ifconfig parsing problem by replacing
ifconfig with ip and I'm parsing "ip addr" output.
hopefully it's ok.
I'm using perl::Net::IPv4Addr and updated spec and debian/control to have this
requirement.
I've noticed that none of spec or debian/control file has dependancies on third
party commands like ifconfig and such.
I known that there are prerequisites, but they are installed later. more over
it's not clean. For example, oscar-config will fail if no ifconfig command is
found (now /usr/bin/ip).
I think we should crosscheck this......(IMHO).
Regards,
Olivier.
--
Olivier LAHAYE
CEA DRT/LIST/DM2I/DIR
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net<mailto:Oscar-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/oscar-devel
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel