1 |
commit: 55897d049a5a479028783def544fd616cbc53427 |
2 |
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 23 18:08:16 2020 +0000 |
4 |
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 23 18:08:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/livecd-tools.git/commit/?id=55897d04 |
7 |
|
8 |
save a grep and a count |
9 |
|
10 |
coreutils has a whole utility just to tell you the cpu count, use it |
11 |
|
12 |
Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo.org> |
13 |
|
14 |
init.d/autoconfig | 2 +- |
15 |
1 file changed, 1 insertion(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/init.d/autoconfig b/init.d/autoconfig |
18 |
index fd68011..9bc3a38 100644 |
19 |
--- a/init.d/autoconfig |
20 |
+++ b/init.d/autoconfig |
21 |
@@ -393,7 +393,7 @@ start() { |
22 |
echo "0" > /proc/sys/kernel/printk |
23 |
get_config |
24 |
|
25 |
- local numcpu="$(grep -c '^processor[[:space:]]\+:' /proc/cpuinfo)" |
26 |
+ local numcpu="$(nproc)" |
27 |
eindent |
28 |
ebegin "Setting sane defaults in /etc/portage/make.conf" |
29 |
if [ -f "/etc/portage/make.conf" ] && checkpath -W /etc/portage/make.conf; then |