diff --git a/setup.sh b/setup.sh index a023530..e6a324d 100644 --- a/setup.sh +++ b/setup.sh @@ -709,6 +709,14 @@ function get_known_good_stub_loader () { curl --silent --location "${known_good_stub_loader}" --output "${local_stub_loader_abs}" } +function add_syslinux_pacman_hook () { + mkdir -p '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main' + git -C '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main' clone 'https://quico.space/quico-os-setup/zbm-syslinux-pacman-hook.git' . + chmod +x '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main/pacman-zbm-syslinux-regen.sh' + ln -s '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main/pacman-zbm-syslinux-regen.sh' '/usr/local/bin/pacman-zbm-syslinux-regen' + ln -s '/opt/git/quico.space/quico-os-setup/zbm-syslinux-pacman-hook/branches/main/pacman-zbm-syslinux-regen.hook' '/usr/share/libalpm/hooks/pacman-zbm-syslinux-regen.hook' +} + function get_disks_with_one_efipart () { local disks_with_one_efipart # Find disks that have exactly one EFI partition and where that EFI @@ -752,6 +760,12 @@ function install_os_in_chroot () { # Yes, we do this twice so we immediately get a functional backup file generate-zbm + + if [[ "${part_schema}" = 'mbr' ]]; then + add_syslinux_pacman_hook + else + : + fi } function set_root_pw () {