From a2d410578fa4b8299d6a9806692d30e103ebef20 Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Wed, 25 Mar 2026 17:19:39 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20poweroff=20not=20reboot=20=E2=80=94=20re?= =?UTF-8?q?move=20reboot=20fallback=20from=20shutdown=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sysrq 'o' first (instant power off), then poweroff -f. Never reboot on clean exit — that was causing power button to restart instead of off. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/initramfs/init | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fedac/native/initramfs/init b/fedac/native/initramfs/init index f885f96730..b39915c7f3 100755 --- a/fedac/native/initramfs/init +++ b/fedac/native/initramfs/init @@ -107,14 +107,14 @@ while true; do # Clean exit (0) = shutdown requested if [ "$EXIT_CODE" = "0" ]; then sync - echo "[ac-init] Clean exit — shutting down..." - # Try multiple shutdown methods - poweroff -f 2>/dev/null - reboot -f 2>/dev/null - # Fallback: write to sysrq + echo "[ac-init] Clean exit — powering off..." + # Sysrq power off (most reliable under initramfs) echo o > /proc/sysrq-trigger 2>/dev/null - # Last resort: direct syscall via busybox + sleep 2 + # Busybox poweroff + poweroff -f 2>/dev/null busybox poweroff -f 2>/dev/null + # If nothing worked, halt (do NOT reboot) sleep 30 break fi -- 2.54.0