This commit is contained in:
Ing 2024-06-11 09:36:30 +08:00
parent 15555ad8b5
commit d47c8acf8d
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
DMI="$(dmesg 2>/dev/null | grep -i "DMI:" | sed 's/\[.*\] DMI: //i')"
CPU="$(echo $(cat /proc/cpuinfo 2>/dev/null | grep 'model name' | uniq | awk -F':' '{print $2}'))"
MEM="$(free -m 2>/dev/null | grep -i mem | awk '{print $2}') MB"
MEM="$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null) MB"
echo -e "$(TEXT "Model: ") \033[1;36m${MODEL}(${PLATFORM})\033[0m"
echo -e "$(TEXT "Version: ") \033[1;36m${PRODUCTVER}(${BUILDNUM}$([ ${SMALLNUM:-0} -ne 0 ] && echo "u${SMALLNUM}"))\033[0m"

View File

@ -222,7 +222,7 @@ if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" -a ! "LOCALBUILD" = "${LOADER_DISK}"
fi
# Check memory
RAM=$(free -m 2>/dev/null | awk '/Mem:/{print $2}')
RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null)
if [ ${RAM:-0} -le 3500 ]; then
echo -e "\033[1;33m$(TEXT "You have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of memory.")\033[0m\n"
fi