feat(os): Add pacman hook to regen syslinux on upgrade (#5)
This commit is contained in:
parent
544b0074e2
commit
61c220afd7
14
setup.sh
14
setup.sh
@ -709,6 +709,14 @@ function get_known_good_stub_loader () {
|
|||||||
curl --silent --location "${known_good_stub_loader}" --output "${local_stub_loader_abs}"
|
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 () {
|
function get_disks_with_one_efipart () {
|
||||||
local disks_with_one_efipart
|
local disks_with_one_efipart
|
||||||
# Find disks that have exactly one EFI partition and where that EFI
|
# 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
|
# Yes, we do this twice so we immediately get a functional backup file
|
||||||
generate-zbm
|
generate-zbm
|
||||||
|
|
||||||
|
if [[ "${part_schema}" = 'mbr' ]]; then
|
||||||
|
add_syslinux_pacman_hook
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_root_pw () {
|
function set_root_pw () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user