Issue #7307 has been updated by John Warburton.

There needs to be some logic around this snippet, as sneep is not installed as 
part of the OS base. It is part of a tools bundle offering from Oracle - 
[http://wikis.sun.com/display/sneep/Home](http://wikis.sun.com/display/sneep/Home),
 and requires an admin decision to install

We have our own local fact to do get the serial number from sneep, but we check 
for the binary first:

    Facter.add(:serialnumber) do
        confine :operatingsystem => %w{Solaris}
        setcode do
            if FileTest.exists?("/opt/SUNWsneep/bin/sneep")
                result = %x{/opt/SUNWsneep/bin/sneep}.chomp
            else
                result = "SUNWsneep not installed"
            end
            result
        end
    end

</blockquote>
----------------------------------------
Feature #7307: serialnumber on sparc solaris
https://projects.puppetlabs.com/issues/7307

Author: Rudy Gevaert
Status: In Topic Branch Pending Merge
Priority: Normal
Assignee: 
Category: library
Target version: 1.6.x
Keywords: 
Branch: https://github.com/jamtur01/facter/tree/tickets/master/7307
Affected Facter version: 


On a solaris sparc machines it isn't possible to get the serialnumber.  In bug 
#5325 support for manufacturer and productname was added.  This can easily be 
extended so that the serialnumber can be provided too.  Just add the following 
in util/manufacturer.rb at the end of prtdiag_sparc_find_system_info().

<pre>
        Facter.add('serialnumber') do
           setcode do
              Facter::Util::Resolution.exec("/usr/sbin/sneep")
           end
        end
</pre>

<pre>
root@pano:facter# facter serialnumber
BEL080466T
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to