kernel-install: remove .extra.d/ directory too

When a UKI is removed, the per-UKI .extra.d/ directory (addons,
extensions, etc) is left behind.
This commit is contained in:
Luca Boccassi
2024-12-01 14:05:45 +09:00
committed by Yu Watanabe
parent a1417e5563
commit 0747e3b60e
+3 -2
View File
@@ -34,9 +34,10 @@ UKI_DIR="$BOOT_ROOT/EFI/Linux"
case "$COMMAND" in
remove)
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \
echo "Removing $UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION*.efi"
exec rm -f \
echo "Removing $UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION*.efi and extras"
exec rm -rf \
"$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi" \
"$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION.efi.extra.d/" \
"$UKI_DIR/$ENTRY_TOKEN-$KERNEL_VERSION+"*".efi"
;;
add)