2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-12-03 07:37:01 +00:00
Files
xcat-dep/grub2-xcat/debian/postinst
T
Vinícius Ferrão ff7e48b480 feat(grub2-xcat): ship the EL10 riscv64 grub2 UEFI image
riscv64 nodes boot through UEFI firmware and grub2 only, and xCAT hands
DHCP client architecture 27 (0x001b) the boot file
boot/grub2/grub2.riscv64. Nothing shipped that file.

Add the unmodified grub2 UEFI image from the Rocky Linux 10 riscv64
BaseOS tree (EFI/BOOT/grubriscv64.efi, the copy used for installation
media and network boot, built from grub2-2.12-46.el10_2.rocky.0.1.src.rpm,
GPL-3.0-or-later, provenance and checksum recorded in the readme) as
Source2, install it under /tftpboot/boot/grub2/riscv64-efi/ and let the
rpm and deb scripts copy it to /tftpboot/boot/grub2/grub2.riscv64 the
same way grub2.ppc is made from the POWER core image. mockbuild.pl
verifies the image type (it reads the PE header itself: file(1) only
learned the RISC-V machine types in 5.38, so an EL8 build host would
reject a good image), the rpm payload and the installed file (byte for
byte the source image); the deb installs the same tree.
2026-08-25 18:30:12 -03:00

44 lines
1.2 KiB
Bash

#!/bin/sh
# postinst script for grub2-xcat
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
rm -f /tftpboot/boot/grub2/grub2.ppc
cp /tftpboot/boot/grub2/powerpc-ieee1275/core.elf /tftpboot/boot/grub2/grub2.ppc
rm -f /tftpboot/boot/grub2/grub2.riscv64
cp /tftpboot/boot/grub2/riscv64-efi/grubriscv64.efi /tftpboot/boot/grub2/grub2.riscv64
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0