feat: Added option to prevent rebuild of the image (#1970)

This commit is contained in:
Kroese
2026-07-26 00:02:17 +02:00
committed by GitHub
parent 0a3bff5a7d
commit 4e35ead612
4 changed files with 82 additions and 56 deletions
-45
View File
@@ -1557,49 +1557,4 @@ legacyInstall() {
return 0
}
legacyPrepare() {
local iso="$1"
local dir="$2"
local desc="$3"
local tmp="$TMP/boot-images"
local image="$tmp/eltorito_img1_bios.img"
ETFS="boot.img"
[ -f "$dir/$ETFS" ] && [ -s "$dir/$ETFS" ] && return 0
rm -f "$dir/$ETFS" || return 1
rm -rf "$tmp" || return 1
LC_ALL=C xorriso \
-no_rc \
-osirrox on \
-indev "$iso" \
-extract_boot_images "$tmp" >/dev/null 2>&1 || {
local rc=$?
rm -rf "$tmp" || true
(( rc > 128 )) && exit "$rc"
error "Failed to extract boot image from $desc ISO!"
return 1
}
if [ ! -s "$image" ]; then
rm -rf "$tmp" || true
error "Failed to locate BIOS boot image in $desc ISO!"
return 1
fi
if ! mv -f "$image" "$dir/$ETFS"; then
rm -rf "$tmp" || true
error "Failed to save boot image from $desc ISO!"
return 1
fi
rm -rf "$tmp" || return 1
return 0
}
return 0