From ca71fe340e090fe641f2e03aea254135e64abcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 11:59:34 +0100 Subject: [PATCH] let cp remove the destination files clone of https://src.fedoraproject.org/rpms/grub2/c/e1206cf45b3bdde97e166d5c0d55842c864a1c9e?branch=rawhide --- 20-zipl-kernel.install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 6847a20..8cb8d86 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -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}"