less indirections, directly call FreeBSD primitives

This commit is contained in:
nojhan 2012-07-30 21:22:16 +02:00
parent f4135f142e
commit a00de370c5

View File

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