From c75f4a0160570f360ec619f7035ed97dc6131669 Mon Sep 17 00:00:00 2001 From: tomnewton-mulga Date: Wed, 15 Apr 2026 09:46:53 +1000 Subject: [PATCH] fix: eject iso boot device --- cmd/installer/autoinstall/autoinstall.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/installer/autoinstall/autoinstall.go b/cmd/installer/autoinstall/autoinstall.go index f302f86e3..ad12a4da0 100644 --- a/cmd/installer/autoinstall/autoinstall.go +++ b/cmd/installer/autoinstall/autoinstall.go @@ -53,9 +53,9 @@ func Load() (*install.Config, error) { // EjectAndReboot ejects the boot device (best-effort) then reboots. func EjectAndReboot() { srcDev, _ := os.ReadFile("/run/iso-dev") - if disk := strings.TrimRight(strings.TrimSpace(string(srcDev)), "0123456789"); disk != "" { - slog.Info("autoinstall: ejecting boot device", "device", disk) - _ = exec.Command("eject", disk).Run() + if dev := strings.TrimSpace(string(srcDev)); dev != "" { + slog.Info("autoinstall: ejecting boot device", "device", dev) + _ = exec.Command("eject", dev).Run() } fmt.Println()