1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 03:09:51 +03:00
aports/main/secureboot-hook/secureboot-hook.pre-upgrade
Jakub Jirutka 6141a78fa9 main/secureboot-hook: upgrade to 1.0 (breaking change)
Changes the default efistub_file from /usr/lib/gummiboot/... to
/usr/lib/systemd/boot/efi/... and doesn't work with gummiboot-efistub
anymore. See #16691 for more information.
2025-05-23 22:04:51 +00:00

23 lines
729 B
Bash

#!/bin/sh
ver_old="$2"
if [ "$(apk version -t "$ver_old" '1.0.0-r0')" = '<' ]; then
cfgfile="/etc/kernel-hooks.d/secureboot.conf"
# If the default efistub_file is used, print warning.
if ! [ -e "$cfgfile" ] \
|| ! grep -q '^efistub_file=' "$cfgfile" \
|| grep -Eq "^efistub_file=[\"']?/usr/lib/gummiboot/" "$cfgfile"
then
cat >&2 <<-EOF
*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*
*! CAUTION: The default EFI stub has been changed! Gummiboot doesn't work
*! anymore, so you have to install "systemd-efistub" (don't worry, it
*! provides just the EFI stub files, nothing more).
*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*
EOF
fi
fi
exit 0