From 08f9ae4a4600228e9035f484f8fd7daf5cee5399 Mon Sep 17 00:00:00 2001 From: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com> Date: Sun, 23 Nov 2025 21:58:36 +0100 Subject: [PATCH] fix: use reboot.target in bash scripts for consistency Complete the migration from login1.Manager.Reboot to reboot.target by updating the bash scripts that were missed in #181. This ensures consistent reboot behavior across all code paths (Rust and bash) and proper systemd shutdown ordering. Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com> --- Cargo.lock | 2 +- Cargo.toml | 2 +- systemd/omnect-device-service.exec_stop_post.sh | 2 +- systemd/update-validation-observer.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0326426..aed986aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2298,7 +2298,7 @@ dependencies = [ [[package]] name = "omnect-device-service" -version = "0.41.13" +version = "0.41.14" dependencies = [ "actix-server", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index fb494706..1218b204 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" name = "omnect-device-service" readme = "README.md" repository = "https://github.com/omnect/omnect-device-service.git" -version = "0.41.13" +version = "0.41.14" [dependencies] actix-server = { version = "2.6", default-features = false } diff --git a/systemd/omnect-device-service.exec_stop_post.sh b/systemd/omnect-device-service.exec_stop_post.sh index 1e9d429b..33b05044 100755 --- a/systemd/omnect-device-service.exec_stop_post.sh +++ b/systemd/omnect-device-service.exec_stop_post.sh @@ -10,7 +10,7 @@ echo SERVICE_RESULT=${SERVICE_RESULT}, EXIT_CODE=${EXIT_CODE}, EXIT_STATUS=${EXI function reboot() { echo "reboot triggered by ${script}: ${1}" /usr/sbin/omnect_reboot_reason.sh log swupdate-validation-failed "${1}" - dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true + systemctl start reboot.target } # for now we only check for ods failed (EXIT_STATUS not 0) and ignore SERVICE_RESULT diff --git a/systemd/update-validation-observer.sh b/systemd/update-validation-observer.sh index 50cdee97..f0e05f86 100644 --- a/systemd/update-validation-observer.sh +++ b/systemd/update-validation-observer.sh @@ -5,5 +5,5 @@ update_validation_file="/run/omnect-device-service/omnect_validate_update" if [ -f ${update_validation_file} ]; then echo "reboot triggered by ${script}" /usr/sbin/omnect_reboot_reason.sh log swupdate-validation-failed "overall timeout" - dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true + systemctl start reboot.target fi