puppetlabs/facter — pull request #258 by apenney (2012-07-14 12:44:56+00:00)
Title: ipaddress improvements

Hi,

This pull request modifies ipaddress to try /sbin/ifconfig and then fallback to /sbin/ip on Linux. It refactors some of the code to use a support function to scrape out the IPs as well. In addition I've added tests for Linux and FreeBSD.

I'm sure there's a bunch of improvements left to make. I'd like to take the get_address_after_token out of ipaddress and ipaddress6 and move it to somewhere they both can share. Is that something you'd normally move into lib/facter/util in some way? I left that for now as I'm not sure what to do with it.