V8.13.544.2025.12.05
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m16s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-12-05 11:49:54 +01:00
parent 0465582eb9
commit f1e24007ff
6 changed files with 96 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ declare -i VAR_ROOTFS_SIZE=$(stat -c%s -- "${ROOTFS}")
# - Filesystem-Slack
declare -i OVERHEAD_FIXED=$((64 * 1024 * 1024))
declare -i OVERHEAD_PCT=3
declare -i ALIGN_BYTES=$(( 4096 * 1024 ))
declare -i ALIGN_BYTES=$(( 1024 * 1024 ))
declare -i BASE_SIZE=$(( VAR_ROOTFS_SIZE + OVERHEAD_FIXED + (VAR_ROOTFS_SIZE * OVERHEAD_PCT / 100) ))
declare -i VAR_LUKSFS_SIZE=$(( ( (BASE_SIZE + ALIGN_BYTES - 1) / ALIGN_BYTES ) * ALIGN_BYTES ))
@@ -107,9 +107,10 @@ while (( TRY < MAX_TRIES )); do
CRYPT_RC=0
exec {KEYFD}<&-
break
else
CRYPT_RC="$?"
fi
CRYPT_RC="$?"
exec {KEYFD}<&-
printf "\e[93m++++ ++++ ++++ ++++ ++++ ++++ ++ ❌ [cryptsetup failed for size %s (rc=%s), increasing by %s bytes.] \e[0m\n" "${TRY_SIZE}" "${CRYPT_RC}" "${ALIGN_BYTES}"