From 309086ac7cb1b574c2fa54cc7ab2b622fced6a37 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. --- 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 84a46d64565f..d74fce7b6d19 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 @@ -2376,7 +2376,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 {