替换源码默认 autocore

This commit is contained in:
Hyy2001X 2021-08-18 18:11:37 +08:00
parent f593af51d5
commit 711be7ec77
3 changed files with 1 additions and 14 deletions

View File

@ -1,12 +0,0 @@
#!/bin/sh
CORES=$(awk -F '[ :]' '/cpu cores/ {print $4;exit}' /proc/cpuinfo)
SENSORS="$(sensors 2>/dev/null | grep 'Core 0')"
if [ "${CORES}" -le 2 ];then
MHz=$(grep 'MHz' /proc/cpuinfo | cut -c12- | sed -n '1p')
[ -n "${SENSORS}" ] && TEMP="(+$(sensors 2>/dev/null | grep 'Core 0' | awk '{print $3}' | cut -d '+' -f2))"
else
MHz="$(echo "$(grep 'MHz' /proc/cpuinfo | awk '{Freq_Sum += $4};END {print Freq_Sum}') / ${CORES}" | bc)"
[ -n "${SENSORS}" ] && TEMP="(+$(echo "$(sensors | grep Core | awk '{Sum += $3};END {print Sum}') / ${CORES}" | bc)°C)"
fi
echo "$MHz MHz ${TEMP}"
sleep 1

View File

@ -17,6 +17,7 @@ case "${OP_Maintainer}/${OP_REPO_NAME}:${OP_BRANCH}" in
coolsnowwolf/lede:master)
AddPackage git other luci-app-adguardhome Hyy2001X master
AddPackage git other luci-app-iperf3-server Hyy2001X master
AddPackage git lean autocore Hyy2001X master
AddPackage svn other luci-app-smartdns kenzok8/openwrt-packages/trunk
AddPackage git other luci-app-serverchan tty228 master
AddPackage svn other luci-app-socat Lienol/openwrt-package/trunk

View File

@ -126,7 +126,6 @@ Firmware-Diy_Main() {
case "${OP_Maintainer}/${OP_REPO_NAME}" in
coolsnowwolf/lede)
Copy ${CustomFiles}/Depends/coremark.sh ${Home}/$(PKG_Finder d "package feeds" coremark)
Copy ${CustomFiles}/Depends/cpuinfo_x86 ${Home}/$(PKG_Finder d package autocore | awk 'NR==1')/files/x86/sbin cpuinfo
sed -i "s?iptables?#iptables?g" ${Version_File}
sed -i "s?${zzz_Default_Version}?${zzz_Default_Version} @ ${Author} [${Display_Date}]?g" ${Version_File}
sed -i "/dns_caching_dns/d" $(PKG_Finder d package luci-app-turboacc)/root/etc/config/turboacc
@ -134,7 +133,6 @@ Firmware-Diy_Main() {
;;
immortalwrt/immortalwrt)
Copy ${CustomFiles}/Depends/openwrt_release_${OP_Maintainer} ${base_files}/etc openwrt_release
Copy ${CustomFiles}/Depends/cpuinfo_x86 ${Home}/$(PKG_Finder d package autocore | awk 'NR==1')/files/x86/sbin cpuinfo
sed -i "s?ImmortalWrt?ImmortalWrt @ ${Author} [${Display_Date}]?g" ${Version_File}
;;
esac