rename installed kernel to match name used in boot entry

clone of af4f1536b6?branch=rawhide
This commit is contained in:
Dan Horák 2023-11-10 11:41:36 +01:00
parent 70bd1af9bd
commit 40db3a57ae
1 changed files with 6 additions and 1 deletions

View File

@ -54,8 +54,13 @@ EOF
case "$COMMAND" in
add)
if [[ "${KERNEL_DIR}" != "/boot" ]]; then
# rename to match the name used in the pseudo-BLS snippet above
rm -f "/boot/vmlinuz-${KERNEL_VERSION}"
cp -aT "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}"
for i in \
"$KERNEL_IMAGE" \
"$KERNEL_DIR"/System.map \
"$KERNEL_DIR"/config \
"$KERNEL_DIR"/zImage.stub