Skip to content

Commit

Permalink
[copy_to_esp] Limit search to target disk only
Browse files Browse the repository at this point in the history
OXT-1632

Signed-off-by: Nicholas Tsirakis <[email protected]>
  • Loading branch information
Nicholas Tsirakis committed Jul 9, 2019
1 parent 86d391c commit 4844382
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 4844382

Please sign in to comment.