Skip to content

Commit

Permalink
Merge pull request #111 from tsirakisn/oxt-1632-st9
Browse files Browse the repository at this point in the history
S9: [copy_to_esp] Limit search to target disk only
  • Loading branch information
jean-edouard authored Jul 10, 2019
2 parents 86d391c + 4844382 commit 6c56607
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion part2/stages/Functions/install-main
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,16 @@ create_efi_boot_entries()

copy_to_esp()
{
local ESP=$(sfdisk -l -q | grep "EFI System" | awk '{ print $1 }')
# TARGET_DISK not defined in upgrades; locate our
# installation disk manually.
if [ -z "${TARGET_DISK}" ]; then
local devnode="$(vgs xenclient --noheadings -o pv_name | sed 's/\s*//g')"
local disk="$(get_devnode_disk ${devnode})"
else
local disk="/dev/${TARGET_DISK}"
fi

local ESP=$(sfdisk -l -q "${disk}" | grep "EFI System" | awk '{ print $1 }')
if [ "${ESP}" == "" ]; then
echo "No EFI System Partition on disk ${DISK_DEV}" >&2
if [ -d /sys/firmware/efi/efivars ]; then
Expand Down

0 comments on commit 6c56607

Please sign in to comment.