From 146f459dacd5f8f5388d6ec53ad4db6266bd68bf Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Tue, 3 Aug 2021 15:21:39 +0800 Subject: [PATCH] =?UTF-8?q?profile:=20=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomFiles/Depends/profile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CustomFiles/Depends/profile b/CustomFiles/Depends/profile index 9685aa7..403cfe1 100644 --- a/CustomFiles/Depends/profile +++ b/CustomFiles/Depends/profile @@ -1,21 +1,20 @@ Sysinfo() { - source /etc/AutoBuild/Default_Variable > /dev/null 2>&1 - source /etc/AutoBuild/Custom_Variable > /dev/null 2>&1 + source /rom/etc/AutoBuild/Default_Variable > /dev/null 2>&1 [ -z "${CURRENT_Version}" ] && CURRENT_Version=未知 [ -z "${TARGET_PROFILE}" ] && local TARGET_PROFILE=$(jsonfilter -e '@.model.id' < /etc/board.json | tr ',' '_') local IP_Address=$(ifconfig -a | grep inet | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}' | tr -d "addr:" | awk 'NR==1') local CoreMark=$([ -f /etc/bench.log ] && egrep -o "[0-9]+" /etc/bench.log | awk 'NR==1') local Startup=$(awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60;d=($1%60)} {printf("%d 天 %d 小时 %d 分钟 %d 秒\n",a,b,c,d)}' /proc/uptime) - local Overlay_Available="$(df -h | grep ":/overlay" | awk '{print $4}' | awk 'NR==1')" - local Tmp_Available="$(df -h | grep "/tmp" | awk '{print $4}' | awk 'NR==1')" + local Overlay_Available="$(df -hT / | grep 'overlay' | awk '{print $5}' | awk 'NR==1')" + local Tmp_Available="$(df -hT /tmp | grep '/tmp' | awk '{print $5}' | awk 'NR==1')" local TEMP=$(sensors 2>/dev/null | grep 'Core 0' | awk '{print $3}') cat <