]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
90-uki-copy.install: Skip removing UKI related when BOOT_ENTRY_TYPE=type1
authorLi Tian <litian@redhat.com>
Sun, 13 Jul 2025 10:59:10 +0000 (18:59 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 15 Jul 2025 13:56:33 +0000 (22:56 +0900)
Commit b6d499768394
("Add --entry-type=type1|type2 option to kernel-install.")

Skip removing UKI related contents when BOOT_ENTRY_TYPE=type1

Signed-off-by: Li Tian <litian@redhat.com>
src/kernel-install/90-uki-copy.install

index 465af49c80082809563afef993c84376e2a410e9..90aa876e6afda982120af50606c3cf454abd3d75 100755 (executable)
@@ -33,6 +33,11 @@ UKI_DIR="$BOOT_ROOT/EFI/Linux"
 
 case "$COMMAND" in
     remove)
+        if [ "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" = "type1" ]; then
+            [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
+                echo "BOOT_ENTRY_TYPE=type1, not removing UKI related."
+            exit 0
+        fi
         [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
             echo "Removing $UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION*.efi and extras"
         exec rm -rf \