From 3ab95cffdf264d78b7f0c91e643487215cdeda64 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 18 Mar 2026 17:17:45 -0600 Subject: [PATCH] Don't re-show the bootloader for < 5 minute sessions This isn't necessarily evidence of instability. Related to #471 --- mkosi.extra/usr/lib/auto-hide-bootloader | 5 ----- .../usr/lib/systemd/system/kde-linux-bless-boot.service | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/mkosi.extra/usr/lib/auto-hide-bootloader b/mkosi.extra/usr/lib/auto-hide-bootloader index 9b157db..3c5f436 100755 --- a/mkosi.extra/usr/lib/auto-hide-bootloader +++ b/mkosi.extra/usr/lib/auto-hide-bootloader @@ -14,11 +14,6 @@ case "${1:-}" in echo "Multiple operating systems detected, not hiding bootloader." exit 0 fi - UPTIME_SECONDS="$(cut -d. -f1 /proc/uptime)" - if [ "$UPTIME_SECONDS" -lt 300 ]; then - echo "System uptime was less than 5 minutes, not hiding bootloader." - exit 0 - fi if [ "$(systemctl show -p Result --value kde-linux-bless-boot.service 2>/dev/null || echo "failed")" = "success" ]; then /usr/bin/bootctl set-timeout 0 fi diff --git a/mkosi.extra/usr/lib/systemd/system/kde-linux-bless-boot.service b/mkosi.extra/usr/lib/systemd/system/kde-linux-bless-boot.service index 42df7a6..9e1a670 100644 --- a/mkosi.extra/usr/lib/systemd/system/kde-linux-bless-boot.service +++ b/mkosi.extra/usr/lib/systemd/system/kde-linux-bless-boot.service @@ -11,7 +11,7 @@ Before=shutdown.target Type=oneshot RemainAfterExit=yes ExecStart=/usr/lib/systemd/systemd-bless-boot good -# If the boot was blessed, the user shuts the system down normally, and the uptime -# is greater than 5 minutes, the bootloader is hidden, because the current image should work. +# If the boot was blessed and the user shuts the system down normally, +# the bootloader is hidden, because the current image should work. # This is idempotent if more than one operating system is installed. ExecStopPost=/usr/lib/auto-hide-bootloader hide