From 64ec9ae3dcd9d1daaf9e7470343056ac09ecb577 Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Mon, 14 Oct 2024 20:24:21 -0700 Subject: [PATCH] switch-to-configuration-ng: remove unnecessary loop The loop removed in this change was originally meant as a synchronization point for stc-ng to prevent executing a switch early in the boot process, however the perl script never needed to make this check and the switch test passes without this loop present. --- .../switch-to-configuration-ng/src/src/main.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs index 802b5e64f101..d874f2bff008 100644 --- a/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs +++ b/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs @@ -1082,22 +1082,6 @@ won't take effect until you reboot the system. .subscribe() .context("Failed to subscribe to systemd dbus messages")?; - // Wait for the system to have finished booting. - loop { - let system_state: String = systemd - .get("org.freedesktop.systemd1.Manager", "SystemState") - .context("Failed to get system state")?; - - match system_state.as_str() { - "running" | "degraded" | "maintenance" => break, - _ => { - _ = dbus_conn - .process(Duration::from_millis(500)) - .context("Failed to process dbus messages")? - } - } - } - let _systemd_reload_status = systemd_reload_status.clone(); let reloading_token = systemd .match_signal(