3-xen-orchestra-install #4

Merged
hygienic-books merged 84 commits from 3-xen-orchestra-install into main 2023-10-22 14:23:54 +00:00
Showing only changes of commit 598b176ec6 - Show all commits

View File

@ -18,6 +18,7 @@ exec 3>&1
declare this_script_url
this_script_url="${SCRIPT_URL:?}"
postconf_hook="$(dirname "${this_script_url}")"'/zbm_set_new_uefi_boot_entries.sh'
declare zpool_name zfs_arch_dataset_name
zpool_name='zpool'
@ -674,21 +675,10 @@ function add_zbm_to_efi () {
local efi_disks_list
efi_disks_list="$(get_disks_with_one_efipart)"
if grep -Piq -- '^'"${efi_drive}"'$' <<<"${efi_disks_list}"; then
efibootmgr --disk "${efi_drive}" \
--part 1 \
--create \
--label "ZFSBootMenu recovery" \
--loader "\EFI\zbm\zfsbootmenu-recovery-vmlinuz-x86_64.EFI" \
--verbose
efibootmgr --disk "${efi_drive}" \
--part 1 \
--create \
--label "ZFSBootMenu release" \
--loader "\EFI\zbm\zfsbootmenu-release-vmlinuz-x86_64.EFI" \
--verbose
fi
efibootmgr
fi
function insert_zbm_postconf_hook () {
declare postconf_target_abs='/mnt/etc/zfsbootmenu/posthooks.d/'"$(basename "${postconf_hook}")"
curl --silent --location "${postconf_hook}" --output "${postconf_target_abs}"
chmod +x "${postconf_target_abs}"
}
function umount_all () {
@ -707,7 +697,7 @@ function finalize_os_setup () {
configure_zfs #3.6
configure_zfs_mount_gen #3.7
configure_zfsbootmenu #3.8
add_zbm_to_efi #3.9
insert_zbm_postconf_hook
umount_all #3.11
}