V8.13.440.2025.11.19
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m37s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-11-25 12:31:38 +00:00
parent ff2aa607ff
commit 6b9f36b044
9 changed files with 1362 additions and 95 deletions

View File

@@ -128,45 +128,53 @@ Live ()
fi
printf "\e[93m[DEBUG] live(): [%s] -> livefs_root. \e[0m\n" "${livefs_root}"
if [ -z "${livefs_root}" ]
then
panic "Unable to find a medium containing a live file system"
if [ -z "${livefs_root}" ]; then
printf "\e[91m[FATAL] live() : Unable to find a medium containing a live file system. \e[0m\n"
sleep 60
log "[FATAL] live() : Unable to find a medium containing a live file system."
panic "[FATAL] live() : Unable to find a medium containing a live file system."
fi
printf "\e[93m[DEBUG] live(): Before [Verify_checksums %s] \e[0m\n" "${livefs_root}"
Verify_checksums "${livefs_root}"
# shellcheck disable=SC2244
if [ "${TORAM}" ]
then
if [ "${TORAM}" ]; then
live_dest="ram"
elif [ "${TODISK}" ]
then
elif [ "${TODISK}" ]; then
live_dest="${TODISK}"
fi
# shellcheck disable=SC2244
if [ "${live_dest}" ]
then
if [ "${live_dest}" ]; then
log_begin_msg "Copying live media to ${live_dest}"
copy_live_to "${livefs_root}" "${live_dest}"
log_end_msg
fi
# if we do not unmount the ISO, we can't run "fsck /dev/ice" later on
# because the mountpoint is left behind in /proc/mounts, so let's get
# rid of it when running from RAM
# shellcheck disable=SC2244
if [ -n "${FROMISO}" ] && [ "${TORAM}" ]
then
if [ -n "${FROMISO}" ] && [ "${TORAM}" ]; then
losetup -d /dev/loop0
if is_mountpoint /run/live/fromiso
then
if is_mountpoint /run/live/fromiso; then
umount /run/live/fromiso
rmdir --ignore-fail-on-non-empty /run/live/fromiso \
>/dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty /run/live/fromiso >/dev/null 2>&1 || true
fi
fi
printf "\e[93m[DBG] Live(): before overlay, live_dest=%s \e[0m\n" "${live_dest:-<none>}"