Revert "less indirections, directly call FreeBSD primitives"

This reverts commit a00de370c5.
This commit is contained in:
Ludovic Rousseau 2012-07-31 10:57:27 +02:00
parent 833ab6b6cf
commit 1a51210e22

View File

@ -79,7 +79,7 @@ OS="Linux"
case $(uname) in
"Linux" ) OS="Linux" ;;
"FreeBSD") OS="FreeBSD" ;;
"Darwin") OS="FreeBSD" ;;
"Darwin") OS="Darwin" ;;
"DragonFly") OS="FreeBSD" ;;
"SunOS") OS="SunOS" ;;
esac
@ -166,6 +166,11 @@ __cpunum_FreeBSD()
sysctl -n hw.ncpu
}
__cpunum_Darwin()
{
__cpunum_FreeBSD
}
__cpunum_SunOS()
{
kstat -m cpu_info | grep "module: cpu_info" | wc -l
@ -188,6 +193,11 @@ __load_FreeBSD()
echo -n "$load"
}
__load_Darwin()
{
__load_FreeBSD
}
__load_SunOS()
{
load=$(LANG=C uptime | awk '{print $10}'| sed -e 's/,//')