From 0ae57a99aa9cc25e27cf6f01ca0b1533c5d9ee60 Mon Sep 17 00:00:00 2001 From: Dimitris Karakasilis Date: Wed, 31 May 2023 12:42:44 +0300 Subject: [PATCH] Don't let "elemental" reboot because the Lifecycle hook will do that Fixes https://github.com/kairos-io/kairos/issues/1460 Signed-off-by: Dimitris Karakasilis --- internal/agent/install.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/agent/install.go b/internal/agent/install.go index 580ab20..98a04ff 100644 --- a/internal/agent/install.go +++ b/internal/agent/install.go @@ -300,8 +300,12 @@ func RunInstall(debug bool, options map[string]string) error { _, reboot := options["reboot"] _, poweroff := options["poweroff"] - installConfig.Reboot = reboot - installConfig.PowerOff = poweroff + if poweroff { + c.Install.Poweroff = true + } + if reboot { + c.Install.Reboot = true + } // Generate the installation spec installSpec, err := elementalConfig.ReadInstallSpec(installConfig)