let cp remove the destination files

clone of e1206cf45b?branch=rawhide
This commit is contained in:
Dan Horák 2023-11-10 11:59:34 +01:00
parent 7a5c89e84a
commit ca71fe340e
1 changed files with 1 additions and 2 deletions

View File

@ -55,8 +55,7 @@ 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 --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}"
cp --remove-destination --preserve=timestamps -T "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}"
command -v restorecon &>/dev/null && \
restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}"