autocore: display ? if "model name" doesn't exist

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
CN_SZTL 2021-01-23 22:39:13 +08:00
parent 68692453e2
commit 285bb05ca3
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -1,6 +1,7 @@
#!/bin/sh
cpu_arch="$(cat "/proc/cpuinfo" | grep "model name" | sed -n "1p" | awk -F ': ' '{print $2}')"
[ -z "${cpu_arch}" ] && cpu_arch="?"
cpu_cores="$(cat "/proc/cpuinfo" | grep "processor" | wc -l)"
if grep -q "bcm27xx" "/etc/openwrt_release"; then