Merge branch 'evilham-explorers' into 'master'
[explorers] Improve *BSD support. See merge request ungleich-public/cdist!869
This commit is contained in:
commit
cd0c811d74
2 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,10 @@ case "$os" in
|
||||||
sysctl -n hw.ncpuonline
|
sysctl -n hw.ncpuonline
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"freebsd"|"netbsd")
|
||||||
|
sysctl -n hw.ncpu
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
if [ -r /proc/cpuinfo ]; then
|
if [ -r /proc/cpuinfo ]; then
|
||||||
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"
|
cores="$(grep "core id" /proc/cpuinfo | sort | uniq | wc -l)"
|
||||||
|
|
|
@ -29,7 +29,7 @@ case "$os" in
|
||||||
echo "$(sysctl -n hw.memsize)/1024" | bc
|
echo "$(sysctl -n hw.memsize)/1024" | bc
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"openbsd")
|
*"bsd")
|
||||||
echo "$(sysctl -n hw.physmem) / 1048576" | bc
|
echo "$(sysctl -n hw.physmem) / 1048576" | bc
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue