puppetlabs/facter — pull request #335 by jeffmccune (2012-10-16 21:51:29+00:00)
Title: (#16526) Fix physicalprocessorcount fact on Solaris

Without this patch applied Facter produces the following error output
when run on versions of Solaris prior to version 8.

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

This is a problem because the value is not actually returned to the end user.

This patch fixes the problem by avoiding the use of the `-p` flag in versions
of Solaris prior to kernel release 5.8 (Solaris 8). In these scenarios, we
simply count the number of lines in the output of the `psrinfo` command.