New review comment by sgn on void-packages repository https://github.com/void-linux/void-packages/pull/24079#discussion_r466088097 Comment: This is not correct. It'll break if user has changed their configuration. And this will break the path relative to mountpoint. Maybe something like this? ```diff diff --git a/srcpkgs/refind/files/kernel.post-install b/srcpkgs/refind/files/kernel.post-install index 88b261aaac..70f26936c0 100755 --- a/srcpkgs/refind/files/kernel.post-install +++ b/srcpkgs/refind/files/kernel.post-install @@ -15,7 +15,14 @@ fi # Default refind.conf : "${REFIND_CONF:=/boot/EFI/refind/refind.conf}" +abs_rootdir="$(cd "${ROOTDIR}" && pwd)" +if [ "$abs_rootdir" != "/" ]; then + abs_rootdir="$abs_rootdir/" +fi + +REFIND_CONF="${abs_rootdir}${REFIND_CONF#/}" zrefind_dir="${REFIND_CONF%/*}" + mkdir -p "$zrefind_dir" touch "$REFIND_CONF" diff --git a/srcpkgs/refind/files/kernel.post-remove b/srcpkgs/refind/files/kernel.post-remove index efb3786396..b50f19680b 100755 --- a/srcpkgs/refind/files/kernel.post-remove +++ b/srcpkgs/refind/files/kernel.post-remove @@ -13,7 +13,8 @@ if [ "z$UPDATE_REFIND_CONF" != "z1" ]; then fi # Default refind.conf -: "${REFIND_CONF:=/boot/EFI/refind/refind.conf}" +: "${REFIND_CONF:=boot/EFI/refind/refind.conf}" +REFIND_CONF="${REFIND_CONF#/}" [ -f "$REFIND_CONF" ] || exit 0 ```