From 7f73591fbf570d849ed737a547b3cb6e11794d30 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Tue, 7 Jul 2020 20:22:05 +0800 Subject: [PATCH] x86: fix cpu temp info --- package/lean/autocore/Makefile | 2 +- package/lean/autocore/files/sbin/cpuinfo | 26 +++--------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/package/lean/autocore/Makefile b/package/lean/autocore/Makefile index f0c5c2787..c6cde396e 100644 --- a/package/lean/autocore/Makefile +++ b/package/lean/autocore/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=autocore PKG_VERSION:=1 -PKG_RELEASE:=33 +PKG_RELEASE:=35 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/autocore/files/sbin/cpuinfo b/package/lean/autocore/files/sbin/cpuinfo index 05f0053d1..8c0527f84 100755 --- a/package/lean/autocore/files/sbin/cpuinfo +++ b/package/lean/autocore/files/sbin/cpuinfo @@ -1,25 +1,5 @@ #!/bin/sh -info() -{ - MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'` - #获取CPU工作频率 - - sensors 2>/dev/null - - if [ $? -eq 0 ];then - a=`sensors | grep 'Core 0' | cut -c10-24` - #获取CPU核心1温度 - - else - a="" - fi -} - -out() -{ - info - echo "$MHz MHz $a " -} - -out +MHz=`grep 'MHz' /proc/cpuinfo | cut -c11- |sed -n '1p'` +TEMP=`sensors 2>/dev/null | grep 'Core 0' | cut -c12-` +echo "$MHz MHz $TEMP "