diff --git a/system-config/kernel-remove-bls.install b/system-config/kernel-remove-bls.install index 1db623e..4533b53 100755 --- a/system-config/kernel-remove-bls.install +++ b/system-config/kernel-remove-bls.install @@ -13,3 +13,9 @@ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then rm -rf /boot/${MACHINE_ID} fi +if [[ $MACHINE_ID ]] && ( [[ -d /boot/efi/${MACHINE_ID} ]] || [[ -L /boot/efi/${MACHINE_ID} ]] ); then + rm -rf /boot/efi/${MACHINE_ID} + rm -f /boot/efi/loader/entries/${MACHINE_ID}-*.conf + # remove only when empty + rmdir /boot/efi/loader/entries /boot/efi/loader || : +fi