Merge "Fixes programmatic error in _install_grub()"
This commit is contained in:
commit
21afeb4017
@ -82,6 +82,8 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None):
|
|||||||
"""Install GRUB2 bootloader on a given device."""
|
"""Install GRUB2 bootloader on a given device."""
|
||||||
LOG.debug("Installing GRUB2 bootloader on device %s", device)
|
LOG.debug("Installing GRUB2 bootloader on device %s", device)
|
||||||
root_partition = _get_partition(device, uuid=root_uuid)
|
root_partition = _get_partition(device, uuid=root_uuid)
|
||||||
|
efi_partition = None
|
||||||
|
efi_partition_mount_point = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Mount the partition and binds
|
# Mount the partition and binds
|
||||||
@ -90,9 +92,6 @@ def _install_grub2(device, root_uuid, efi_system_part_uuid=None):
|
|||||||
if efi_system_part_uuid:
|
if efi_system_part_uuid:
|
||||||
efi_partition = _get_partition(device, uuid=efi_system_part_uuid)
|
efi_partition = _get_partition(device, uuid=efi_system_part_uuid)
|
||||||
efi_partition_mount_point = os.path.join(path, "boot/efi")
|
efi_partition_mount_point = os.path.join(path, "boot/efi")
|
||||||
else:
|
|
||||||
efi_partition = None
|
|
||||||
efi_partition_mount_point = None
|
|
||||||
|
|
||||||
utils.execute('mount', root_partition, path)
|
utils.execute('mount', root_partition, path)
|
||||||
for fs in BIND_MOUNTS:
|
for fs in BIND_MOUNTS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user