From a650a37ffad5229e9687248b660b538d830fafa5 Mon Sep 17 00:00:00 2001 From: Aleksei Fedotov <102949797+alekseifedotov@users.noreply.github.com> Date: Sat, 7 Dec 2024 07:42:34 +0100 Subject: [PATCH] update-agent: don't use dbus if run with '--nodbus' (#309) fix: if run with '--nodbus' don't try using dbus for shutdown. Co-authored-by: Ryan Butler --- update-agent/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update-agent/src/main.rs b/update-agent/src/main.rs index d15043d0..27035cc8 100644 --- a/update-agent/src/main.rs +++ b/update-agent/src/main.rs @@ -693,8 +693,8 @@ fn shutdown_with_executable() -> eyre::Result<()> { /// ⚠️ BUT, we need to send the power-off/shutdown command to the Jetson /// because the microcontroller can't detect a Jetson reboot. fn reboot(settings: &Settings) -> eyre::Result<()> { - debug!("trying to shut down using dbus"); - if !settings.recovery { + if !settings.recovery && !settings.nodbus { + debug!("trying to shut down using dbus"); match shutdown_with_dbus() { Ok(()) => return Ok(()), Err(e) => {