void-packages/srcpkgs/refind/files/kernel.post-remove
classabbyamp 9ab1405894
*: remove unnecessary execute permissions
* INSTALL scripts don't need to be executable
* anything installed by vbin is set to 755
* many of these files were otherwise marked executable in the template
  (vinstall, chmod, etc)
* some had no business being executable, like the smattering of patches
  and other files
* remove files from chroot-distcc no longer used in the template
  (46ce787b63d467d9b8e5ef8821e2ddefea4b980a)
2024-08-02 13:24:47 -04:00

27 lines
600 B
Bash

#!/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}"
# Make sure paths are relative
REFIND_CONF="${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"