Issue #16526 has been updated by Alex Harvey.

In the days of Solaris 7 and earlier all processors were physical processors 
thus one gets the processor count using -

    $ psrinfo |wc -l
           1

The following may be a suitable solution:

    $ diff ./lib/facter/physicalprocessorcount.rb.orig 
./lib/facter/physicalprocessorcount.rb
    70c70,75
    <     Facter::Util::Resolution.exec("/usr/sbin/psrinfo -p")
    ---
    >     if %w(5.7 5.6 5.5.1).include? Facter.value(:kernelrelease)
    >       p = Facter::Util::Resolution.exec("/usr/sbin/psrinfo")
    >       p.lines.count
    >     else
    >       Facter::Util::Resolution.exec("/usr/sbin/psrinfo -p")
    >     end

----------------------------------------
Bug #16526: illegal option -p passed to psrinfo on Solaris 7 and earlier in 
'physicalprocessorcount' fact
https://projects.puppetlabs.com/issues/16526#change-71494

Author: Alex Harvey
Status: Unreviewed
Priority: Normal
Assignee: Alex Harvey
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.12-rc2


The -p option to psrinfo was not introduced until Solaris 8 leading to the 
following failure in Solaris 7 and earlier -

    $ facter -d physicalprocessorcount
    /usr/sbin/psrinfo: illegal option -- p
    usage:
            psrinfo [-v] [processor_id ...]
            psrinfo -s processor_id
    value for physicalprocessorcount is still nil



-- 
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