add show smallfixnumber

This commit is contained in:
Ing 2023-06-25 22:44:10 +08:00
parent 731b7c6f2d
commit 7437fb7008
3 changed files with 7 additions and 2 deletions

View File

@ -57,13 +57,16 @@ MODEL="$(readConfigKey "model" "${USER_CONFIG_FILE}")"
BUILD="$(readConfigKey "build" "${USER_CONFIG_FILE}")" BUILD="$(readConfigKey "build" "${USER_CONFIG_FILE}")"
LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")" LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")" SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
SFNUM="$(readConfigKey "smallfixnumber" "${USER_CONFIG_FILE}")"
CPU="$(cat /proc/cpuinfo | grep 'model name' | uniq | awk -F': ' '{print $2}')" CPU="$(echo $(cat /proc/cpuinfo | grep 'model name' | uniq | awk -F':' '{print $2}'))"
MEM="$(free -m | grep -i mem | awk '{print$2}') MB"
echo -e "$(TEXT "Model:") \033[1;36m${MODEL}\033[0m" echo -e "$(TEXT "Model:") \033[1;36m${MODEL}\033[0m"
echo -e "$(TEXT "Build:") \033[1;36m${BUILD}\033[0m" echo -e "$(TEXT "Build:") \033[1;36m${BUILD}$([ ${SFNUM:-0} -ne 0 ] && echo "u${SFNUM}")\033[0m"
echo -e "$(TEXT "LKM: ") \033[1;36m${LKM}\033[0m" echo -e "$(TEXT "LKM: ") \033[1;36m${LKM}\033[0m"
echo -e "$(TEXT "CPU: ") \033[1;36m${CPU}\033[0m" echo -e "$(TEXT "CPU: ") \033[1;36m${CPU}\033[0m"
echo -e "$(TEXT "MEM: ") \033[1;36m${MEM}\033[0m"
if [ ! -f "${MODEL_CONFIG_PATH}/${MODEL}.yml" ] || [ -z "$(readConfigKey "builds.${BUILD}" "${MODEL_CONFIG_PATH}/${MODEL}.yml")" ]; then if [ ! -f "${MODEL_CONFIG_PATH}/${MODEL}.yml" ] || [ -z "$(readConfigKey "builds.${BUILD}" "${MODEL_CONFIG_PATH}/${MODEL}.yml")" ]; then
echo -e "\033[1;33m*** $(printf "$(TEXT "The current version of arpl does not support booting %s-%s, please rebuild.")" "${MODEL}" "${BUILD}") ***\033[0m" echo -e "\033[1;33m*** $(printf "$(TEXT "The current version of arpl does not support booting %s-%s, please rebuild.")" "${MODEL}" "${BUILD}") ***\033[0m"

View File

@ -89,6 +89,7 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then
writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}" writeConfigKey "addons" "{}" "${USER_CONFIG_FILE}"
writeConfigKey "addons.misc" "" "${USER_CONFIG_FILE}" writeConfigKey "addons.misc" "" "${USER_CONFIG_FILE}"
writeConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}" writeConfigKey "addons.acpid" "" "${USER_CONFIG_FILE}"
writeConfigKey "addons.reboottoarpl" "" "${USER_CONFIG_FILE}"
writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}" writeConfigKey "modules" "{}" "${USER_CONFIG_FILE}"
# When the user has not customized, Use 1 to maintain normal startup parameters. # When the user has not customized, Use 1 to maintain normal startup parameters.
# writeConfigKey "cmdline.netif_num" "1" "${USER_CONFIG_FILE}" # writeConfigKey "cmdline.netif_num" "1" "${USER_CONFIG_FILE}"

View File

@ -191,4 +191,5 @@ rm -rf "${RAMDISK_PATH}"
# Update SHA256 hash # Update SHA256 hash
RAMDISK_HASH="$(sha256sum ${ORI_RDGZ_FILE} | awk '{print$1}')" RAMDISK_HASH="$(sha256sum ${ORI_RDGZ_FILE} | awk '{print$1}')"
writeConfigKey "ramdisk-hash" "${RAMDISK_HASH}" "${USER_CONFIG_FILE}" writeConfigKey "ramdisk-hash" "${RAMDISK_HASH}" "${USER_CONFIG_FILE}"
writeConfigKey "smallfixnumber" "${smallfixnumber}" "${USER_CONFIG_FILE}"
echo echo