[ap4r-devel] [ ap4r-Patches-21225 ] Patch for uuid to run under AIX

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 14 23:56:20 EDT 2008


Patches item #21225, was opened at 2008-07-15 12:56
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=6912&aid=21225&group_id=1765

Category: UUID
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: shunichi shinohara (shino)
Assigned to: Nobody (None)
Summary: Patch for uuid to run under AIX

Initial Comment:
recently had occasion to install your uuid GEM on an AIX system.  I had a problem due to the fact that AIX does not put a MAC address in the output of "ifconfig".  It does put MAC addresses in the output of "netstat -v".  I modified the code in the following way, and uuid now works on AIX.  I have tested this on both AIX 5.3 and AIX 6.1, but all versions of AIX I have worked with would have the same issue.  ifconfig has never reported a MAC address, and netstat -v always has.

     # Run ifconfig for UNIX, or ipconfig for Windows.
     config = ""
     Kernel.open "|ifconfig" do |input|
       input.each_line { |line| config << line }
     end rescue nil
     Kernel.open "|netstat -v" do |input|         # AIX
       input.each_line { |line| config << line }  # AIX
     end rescue nil                               # AIX
     Kernel.open "|ipconfig /all" do |input|
       input.each_line { |line| config << line }
     end rescue nil

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=6912&aid=21225&group_id=1765


More information about the ap4r-devel mailing list