#!/hint/bash -euE # Copyright (C) 2023-2024 Umorpha Systems # SPDX-License-Identifier: AGPL-3.0-or-later post_install+=(20:base-uki:post_install) base-uki:post_install() { local arg_mountpoint=$1 # Just until we db-import mkinitcpio v38. if ! grep -q is_kernelcopy "$arg_mountpoint"/usr/share/libalpm/scripts/mkinitcpio; then cat /usr/share/libalpm/scripts/mkinitcpio >"$arg_mountpoint"/usr/share/libalpm/scripts/mkinitcpio fi cat >"$arg_mountpoint/usr/share/mkinitcpio/hook.preset" <<-'EOF' #!/hint/bash # mkinitcpio preset file for the '%PKGBASE%' package #ALL_config="/etc/mkinitcpio.conf" ALL_kver=$(grep -Fxl '%PKGBASE%' /usr/lib/modules/*/pkgbase|sed 's,pkgbase$,vmlinuz,') ALL_microcode=(/boot/*-ucode.img) PRESETS=('default' 'fallback') #default_config="/etc/mkinitcpio.conf" #default_image="/boot/initramfs-%PKGBASE%.img" default_uki="/boot/EFI/Linux/parabola-%PKGBASE%.efi" #default_options="--splash /usr/share/systemd/bootctl/splash-parabola.bmp" #fallback_config="/etc/mkinitcpio.conf" #fallback_image="/boot/initramfs-%PKGBASE%-fallback.img" fallback_uki="/boot/EFI/Linux/parabola-%PKGBASE%-fallback.efi" fallback_options="-S autodetect" EOF }