fix: Move order in entry file (#1078)

This commit is contained in:
Kroese 2025-10-17 13:04:03 +02:00 committed by GitHub
parent e1e5f8f91d
commit 175d90aad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -18,8 +18,8 @@ cd /run
. proc.sh # Initialize processor
. serial.sh # Initialize serialport
. power.sh # Configure shutdown
. config.sh # Configure arguments
. memory.sh # Check available memory
. config.sh # Configure arguments
. finish.sh # Finish initialization
trap - ERR

View File

@ -2,7 +2,7 @@
set -Eeuo pipefail
RAM_AVAIL=$(free -b | grep -m 1 Mem: | awk '{print $7}')
if [[ "$RAM_CHECK" != [Nn]* && "${RAM_SIZE,,}" != "max" && "${RAM_SIZE,,}" != "half" ]]; then
AVAIL_MEM=$(formatBytes "$RAM_AVAIL")
@ -59,15 +59,15 @@ if [[ "${RAM_SIZE,,}" == "max" ]]; then
RAM_WANTED=$(( RAM_WANTED / 1073741825 ))
if (( "$RAM_WANTED" < 1 )); then
RAM_WANTED=$(( RAM_AVAIL - RAM_SPARE ))
RAM_WANTED=$(( RAM_WANTED / 1048577 ))
if (( "$RAM_WANTED" < 1 )); then
RAM_WANTED=$(( RAM_AVAIL ))
RAM_WANTED=$(( RAM_WANTED / 1048577 ))
fi
RAM_SIZE="${RAM_WANTED}M"
@ -80,7 +80,7 @@ if [[ "${RAM_SIZE,,}" == "max" ]]; then
else
RAM_SIZE="${RAM_WANTED}G"
fi
fi
return 0