From a02c397786acbe5450b7d6697fd0f0b1a2fcd586 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Mon, 21 Jun 2021 08:08:10 +0200 Subject: [PATCH] 20-grub-install: Create a symvers.gz symbolic link This is not needed for boot, just a symlink would be enough for tools that expect this file to be present in the boot directory. Signed-off-by: Javier Martinez Canillas --- 20-grub.install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/20-grub.install b/20-grub.install index 8ae3885..ccc85fb 100755 --- a/20-grub.install +++ b/20-grub.install @@ -75,6 +75,14 @@ case "$COMMAND" in command -v restorecon &>/dev/null && \ restorecon "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" fi + # symvers is symvers-.gz symlink, needs a special treatment + i="$KERNEL_DIR/symvers.gz" + if [[ -e "$i" ]]; then + rm -f "/boot/symvers-${KERNEL_VERSION}.gz" + ln -s "$i" "/boot/symvers-${KERNEL_VERSION}.gz" + command -v restorecon &>/dev/null && \ + restorecon "/boot/symvers-${KERNEL_VERSION}.gz" + fi fi if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then @@ -163,6 +171,8 @@ case "$COMMAND" in done # hmac is .vmlinuz-.hmac so needs a special treatment rm -f "/boot/.vmlinuz-${KERNEL_VERSION}.hmac" + # symvers is symvers-.gz symlink, needs a special treatment + rm -f "/boot/symvers-${KERNEL_VERSION}.gz" exit 0 fi