From a120f0c082bb649834a33b44e2d42ac9394500a6 Mon Sep 17 00:00:00 2001 From: cam Date: Wed, 16 Oct 2024 12:16:48 +1300 Subject: [PATCH] Only check if a salt command is running when the modem is already powered --- cmd/modemd/modemController.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/modemd/modemController.go b/cmd/modemd/modemController.go index cdb7d90..570969d 100644 --- a/cmd/modemd/modemController.go +++ b/cmd/modemd/modemController.go @@ -893,7 +893,7 @@ func (mc *ModemController) shouldBeOnWithReason() (bool, string) { return true, fmt.Sprintf("Modem should be on because minimum connection duration is %v.", mc.MinConnDuration) } - if saltCommandsRunning() { + if mc.IsPowered && saltCommandsRunning() { return true, fmt.Sprintln("Modem should be on because salt commands are running.") }