Read /boot as root when looking for the Omarchy UKI (#6653)
* Find the Omarchy UKI as root when setting up direct boot /boot is mounted with dmask=0077 on encrypted installs, so the unprivileged find returned nothing and direct boot always reported that no UKI was present. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Check for the legacy UKI as root when refreshing limine The unprivileged file tests were always false on encrypted installs, so the stale <machine-id>_linux.efi was never cleaned up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1ded25fd45
commit
f8c235a5e4
@@ -3,9 +3,11 @@
|
||||
# omarchy:summary=Overwrite the user config for the Limine bootloader and rebuild it.
|
||||
# omarchy:requires-sudo=true
|
||||
|
||||
if [[ -f /boot/EFI/Linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi ]]; then
|
||||
legacy_uki="/boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi"
|
||||
|
||||
if sudo test -f /boot/EFI/Linux/omarchy_linux.efi && sudo test -f "$legacy_uki"; then
|
||||
echo "Cleanup extra UKI"
|
||||
sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi
|
||||
sudo rm -f "$legacy_uki"
|
||||
fi
|
||||
echo "Resetting limine config"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ if [[ -n $existing_entry ]]; then
|
||||
|
||||
exit 0
|
||||
else
|
||||
uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
|
||||
uki_file=$(sudo find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1)
|
||||
|
||||
if [[ -z $uki_file ]]; then
|
||||
echo "Error: No Omarchy UKI found in /boot/EFI/Linux/" >&2
|
||||
|
||||
Reference in New Issue
Block a user