From 9b9962ea981507931c1dee9c00cc421e48a9e745 Mon Sep 17 00:00:00 2001 From: Tom Dewey Date: Tue, 13 Aug 2024 10:22:29 +0100 Subject: [PATCH] provisioner: Use helper functions instead of paths --- device-provisioner/provisioner.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device-provisioner/provisioner.sh b/device-provisioner/provisioner.sh index 467d51f..395c20c 100755 --- a/device-provisioner/provisioner.sh +++ b/device-provisioner/provisioner.sh @@ -205,9 +205,9 @@ case ${RPI_DEVICE_FAMILY} in ;; esac -cp /var/lib/rpi-sb-provisioner/fastboot-gadget.img "${RPI_SB_WORKDIR}"/boot.img +cp "$(get_fastboot_gadget)" "${RPI_SB_WORKDIR}"/boot.img -cp /var/lib/rpi-sb-provisioner/boot_ramdisk_config.txt "${RPI_SB_WORKDIR}"/config.txt +cp "$(get_fastboot_config_file)" "${RPI_SB_WORKDIR}"/config.txt #boot.sig generation sha256sum "${RPI_SB_WORKDIR}"/boot.img | awk '{print $1}' > "${RPI_SB_WORKDIR}"/boot.sig @@ -295,8 +295,8 @@ if [[ -z $(check_file_is_expected "${RPI_SB_WORKDIR}"/bootfs-temporary.img "img" # We supply a pre-baked Raspberry Pi Pre-boot-authentication initramfs, which we insert here. # This image is maintained by Raspberry Pi, with sources available on our GitHub pages. announce_start "Insert pre-boot authentication initramfs" - cp /var/lib/rpi-sb-provisioner/cryptroot_initramfs "${TMP_DIR}"/rpi-boot-img-mount/initramfs8 - cp /var/lib/rpi-sb-provisioner/cryptroot_initramfs "${TMP_DIR}"/rpi-boot-img-mount/initramfs_2712 + cp "$(get_cryptroot)" "${TMP_DIR}"/rpi-boot-img-mount/initramfs8 + cp "$(get_cryptroot)" "${TMP_DIR}"/rpi-boot-img-mount/initramfs_2712 announce_stop "Insert pre-boot authentication initramfs" announce_start "Initramfs modification"