Skip to content

Commit 64ec9ae

Browse files
committed
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.
1 parent 3d85bae commit 64ec9ae

File tree

1 file changed

+0
-16
lines changed
  • pkgs/by-name/sw/switch-to-configuration-ng/src/src

1 file changed

+0
-16
lines changed

pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,22 +1082,6 @@ won't take effect until you reboot the system.
10821082
.subscribe()
10831083
.context("Failed to subscribe to systemd dbus messages")?;
10841084

1085-
// Wait for the system to have finished booting.
1086-
loop {
1087-
let system_state: String = systemd
1088-
.get("org.freedesktop.systemd1.Manager", "SystemState")
1089-
.context("Failed to get system state")?;
1090-
1091-
match system_state.as_str() {
1092-
"running" | "degraded" | "maintenance" => break,
1093-
_ => {
1094-
_ = dbus_conn
1095-
.process(Duration::from_millis(500))
1096-
.context("Failed to process dbus messages")?
1097-
}
1098-
}
1099-
}
1100-
11011085
let _systemd_reload_status = systemd_reload_status.clone();
11021086
let reloading_token = systemd
11031087
.match_signal(

0 commit comments

Comments
 (0)