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