[codeforpeople-rocks] macaddr patch to add Solaris support

Mike Cumings mcumings at gmail.com
Tue Mar 10 17:29:35 EDT 2009

The current macaddr 1.0.0 lib does not work on Solaris.  It currently
expects "ifconfig" to display all candidate MAC addresses.  This does
not happen on Solaris unless "ifconfig -a" is run and the command is
executed as the root user.  I've attached a patch which uses "arp -an"
instead of "ifconfig" if the PLATFORM is a solaris variant.  I've
tested the update on Solaris 9 and 10 as well as my Linux laptop.  If
accepted, can you please spin up and publish a new gem build?

I'm still a fledgling Ruby programmer, so if the patch strays from
traditional Rubyisms, please don't hold it against me. ;)

Thanks in advance,

Mike Cumings
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macaddr.patch
Type: text/x-patch
Size: 1944 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/codeforpeople-rocks/attachments/20090310/a2b8a906/attachment.bin>

More information about the codeforpeople-rocks mailing list