Skip to content

Commit b7c2ef9

Browse files
committed
feat(install.d):according to the changes of systemd/systemd#37897, When --entry-type=type2 is used (for UKI), will not remove normal kernel IMAGE.
Signed-off-by: Xiaoqiang Xiong <[email protected]>
1 parent 5d2bda4 commit b7c2ef9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

install.d/50-dracut.install

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ case "$COMMAND" in
109109
;;
110110

111111
remove)
112+
if [[ "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" == "type2" ]]; then
113+
[[ "${KERNEL_INSTALL_VERBOSE:-0}" -gt 0 ]] && \
114+
echo "Not removing UKI image (type2); handled by systemd's 90-uki-copy.install"
115+
exit 0
116+
fi
112117
rm -f -- "$BOOT_DIR_ABS/$IMAGE"
113118
ret=$?
114119
;;

0 commit comments

Comments
 (0)