From d3b3cf523e000a55f8be048d987a49c155efd320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Mon, 13 Jul 2026 14:13:56 +0200 Subject: [PATCH] switch-to-configuration-ng: Die less This is horrible when logind fails (for any reason) and the services that were stopped already do not get started anymore because stc-ng died. This replaces the die() with the exit code so regular tooling should pick up that something failed without the catastrophic events of services like sshd not running. (cherry picked from commit 309086ac7cb1b574c2fa54cc7ab2b622fced6a37) --- pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs b/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs index 6dd05161628f..2d582a7d479c 100644 --- a/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs +++ b/pkgs/by-name/sw/switch-to-configuration-ng/src/main.rs @@ -2381,7 +2381,7 @@ won't take effect until you reboot the system. match logind.list_users() { Err(err) => { eprintln!("Unable to list users with logind: {err}"); - die(); + exit_code = 4; } Ok(users) => { for (uid, name, user_dbus_path) in users {