[[chef-dev]] Modifying the solaris2 Ohai plugin.


Chronological Thread 
  • From: "Jason J. W. Williams" < >
  • To:
  • Subject: [[chef-dev]] Modifying the solaris2 Ohai plugin.
  • Date: Wed, 20 Jul 2011 20:55:09 -0600

I'm trying to modify the platform.rb module of the Ohai Solaris2
plugin in order to extend it to detect the various distributions of
Solaris (Solaris/Solaris Express, OpenIndiana, Nexenta, etc.).
However, if I modify the file:

/usr/lib/ruby/gems/1.9.1/gems/ohai-0.6.4/lib/ohai/plugins/solaris2/platform.rb

...my changes don't seem to take effect. I've even tried adding:
platform "test123"

However the platform still indicates "solaris2" when I run Ohai. This
appears to be from the line:

platform os unless attribute?("platform")

in /usr/lib/ruby/gems/1.9.1/gems/ohai-0.6.4/lib/ohai/plugins/platform.rb,
because attribute?("platform") is evaluating to false. It appears that
Ohai isn't running platform.rb in the solaris2 plugin at all. Any
pointers are greatly appreciated.

-J



Archive powered by MHonArc 2.6.16.

§