- both efibootmgr and grub enable page_poison by default. Let's enable it with refind, too - The old post-install hook was written (by me, myself) was originally written in ed, and converted to ugly-and-lengthy while-read-echo sh. Both base-minimal, base-system, and base-chroot provides some kind of awk, let's rewrite it in awk.
24 lines
539 B
Bash
Executable file
24 lines
539 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Kernel hook for refind.
|
|
#
|
|
# Arguments passed to this script: $1 pkgname, $2 version.
|
|
#
|
|
PKGNAME="$1"
|
|
VERSION="$2"
|
|
|
|
. "${ROOTDIR}/etc/default/refind-kernel-hook.conf"
|
|
if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then
|
|
exit 0;
|
|
fi
|
|
|
|
# Default refind.conf
|
|
: "${REFIND_CONF:=/boot/EFI/refind/refind.conf}"
|
|
|
|
[ -f "$REFIND_CONF" ] || exit 0
|
|
|
|
tmpfile=$(mktemp /tmp/refind.XXXXXXX)
|
|
zversion=$(echo $VERSION | sed 's/[.]/[.]/g')
|
|
sed "/^menuentry \"Void Linux $zversion\" [{]\$/,/[}]/d" "$REFIND_CONF" >"$tmpfile"
|
|
|
|
mv "$tmpfile" "$REFIND_CONF"
|