mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Fix ./bin/package host cpu
on FreeBSD (#99)
This bugfix is from Marcin Cieślak's fork of the INIT build system. Before this bugfix, running 'bin/package host cpu' on FreeBSD would always report one CPU core, even if the CPU is multi-core: $ ./bin/package host cpu 1 bin/package, src/cmd/INIT/package.sh: - Correctly report the number of CPUs on FreeBSD by using 'sysctl -n hw.ncpu'.
This commit is contained in:
parent
81f3a6294a
commit
af9c2144b8
2 changed files with 14 additions and 0 deletions
|
@ -1673,6 +1673,13 @@ hostinfo() # attribute ...
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
cpu=`sysctl -n hw.ncpu`
|
||||||
|
case $cpu in
|
||||||
|
[123456789]*)
|
||||||
|
_hostinfo_="$_hostinfo_ $cpu"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
cpu=`grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo`
|
cpu=`grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo`
|
||||||
case $cpu in
|
case $cpu in
|
||||||
[123456789]*)
|
[123456789]*)
|
||||||
|
|
|
@ -1672,6 +1672,13 @@ hostinfo() # attribute ...
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
cpu=`sysctl -n hw.ncpu`
|
||||||
|
case $cpu in
|
||||||
|
[123456789]*)
|
||||||
|
_hostinfo_="$_hostinfo_ $cpu"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
cpu=`grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo`
|
cpu=`grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo`
|
||||||
case $cpu in
|
case $cpu in
|
||||||
[123456789]*)
|
[123456789]*)
|
||||||
|
|
Loading…
Reference in a new issue