getconf won't say the number of CPUs, sysctl will.
# Flags section
##############################################################################
# Flags section
##############################################################################
-if which getconf > /dev/null; then
+if which getconf > /dev/null && getconf _NPROCESSORS_ONLN > /dev/null; then
CPUS=$(getconf _NPROCESSORS_ONLN)
CPUS=$(getconf _NPROCESSORS_ONLN)
+elif which sysctl > /dev/null && sysctl hw.ncpu > /dev/null; then
+ CPUS=$(sysctl hw.ncpu | sed -E -e 's/^hw\.ncpu(: | = )//')