From 76209ee33e64a9cbeed7916560f45d947353ae91 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 23 Oct 2025 14:06:28 -0400 Subject: [PATCH] Only clean if we see the entry --- migrations/1761241493.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/migrations/1761241493.sh b/migrations/1761241493.sh index ffb620e1..c4b977f0 100644 --- a/migrations/1761241493.sh +++ b/migrations/1761241493.sh @@ -1,6 +1,11 @@ echo "Cleanup extra UKI if needed to prevent errors" if [[ -f /boot/EFI/linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/linux/$(cat /etc/machine-id)_linux.efi ]]; then - sudo mv /boot/limine.conf /boot/limine.conf.bak + sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi + + if grep -q "/boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi" /boot/limine.conf; then + echo -e "Resetting limine config\n(you may need to re-add other entries via sudo limine-update)" + + sudo mv /boot/limine.conf /boot/limine.conf.bak sudo tee /boot/limine.conf </dev/null ### Read more at config document: https://github.com/limine-bootloader/limine/blob/trunk/CONFIG.md #timeout: 3 @@ -22,7 +27,7 @@ term_foreground_bright: c0caf5 term_background_bright: 24283b EOF - sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi - sudo limine-update - sudo limine-snapper-sync + sudo limine-update + sudo limine-snapper-sync + fi fi