From cf4ab17a54a2fb8126da2468cce99c68da92c909 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 17:53:25 +0200 Subject: [PATCH] Fix common vars --- iso/scripts/common_iso_generation.sh | 1 - iso/scripts/generate_dappnode_iso_debian.sh | 9 ++++++--- iso/scripts/generate_dappnode_iso_ubuntu.sh | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/iso/scripts/common_iso_generation.sh b/iso/scripts/common_iso_generation.sh index 501e563..d520753 100644 --- a/iso/scripts/common_iso_generation.sh +++ b/iso/scripts/common_iso_generation.sh @@ -3,7 +3,6 @@ WORKDIR="/usr/src/app" ISO_BUILD_PATH="${WORKDIR}/dappnode-iso" DAPPNODE_ISO_PREFIX="Dappnode-" -DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}" add_dappnode_files() { local iso_build_path=$1 diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 03ef8b5..645755c 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -9,6 +9,9 @@ BASE_ISO_PATH="/images/${BASE_ISO_NAME}" BASE_ISO_URL="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/${BASE_ISO_NAME}" BASE_ISO_SHASUM="013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f ${BASE_ISO_PATH}" +DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}" +DAPPNODE_ISO_PATH="/images/${DAPPNODE_ISO_NAME}" + customize_debian_preseed() { local iso_build_path=$1 local workdir=$2 @@ -75,10 +78,10 @@ generate_debian_iso() { echo "[INFO] Generating new ISO..." - xorriso -as mkisofs -isohybrid-mbr ${ISO_BUILD_PATH}/isolinux/isohdpfx.bin \ + xorriso -as mkisofs -isohybrid-mbr ${mbr_path} \ -c /isolinux/boot.cat -b /isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \ -boot-info-table -eltorito-alt-boot -e /boot/grub/efi.img -no-emul-boot \ - -isohybrid-gpt-basdat -o "/images/${DAPPNODE_ISO_NAME}" ${ISO_BUILD_PATH} + -isohybrid-gpt-basdat -o "${iso_output_path}" ${iso_build_path} } download_iso "${BASE_ISO_PATH}" "${BASE_ISO_NAME}" "${BASE_ISO_URL}" @@ -91,4 +94,4 @@ add_dappnode_files "${ISO_BUILD_PATH}" "${WORKDIR}" customize_debian_preseed "${ISO_BUILD_PATH}" "${WORKDIR}" configure_boot_menu "${ISO_BUILD_PATH}" "${WORKDIR}" handle_checksums # TODO: Check if it fits both ubuntu and debian -generate_debian_iso "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" "${DAPPNODE_ISO_NAME}" "${ISO_BUILD_PATH}" +generate_debian_iso "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" "${DAPPNODE_ISO_PATH}" "${ISO_BUILD_PATH}" diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index ce64937..3246ec8 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -10,9 +10,11 @@ TMP_INITRD="/tmp/makeinitrd" BASE_ISO_NAME=ubuntu-24.04-live-server-amd64.iso BASE_ISO_PATH="/images/${BASE_ISO_NAME}" BASE_ISO_URL="https://labs.eif.urjc.es/mirror/ubuntu-releases/24.04/${BASE_ISO_NAME}" -DAPPNODE_ISO_PATH="/images/DAppNode-${BASE_ISO_NAME}" BASE_ISO_SHASUM="8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3 ${BASE_ISO_PATH}" +DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}" +DAPPNODE_ISO_PATH="/images/${DAPPNODE_ISO_NAME}" + get_efi_partition() { local base_iso_path=$1 local dest_efi_path=$2