mind-body: a partial brake stop names each unit's state
When systemctl stop fails, stop_all asks is-active for each of the two units and the error names each state (active, inactive, failed, unknown) beside the exit status; brake hold says the brake is held and the stop failed, not that the units were not stopped. Exit 2 and the held brake are unchanged. Follow-up brake-partial-stop-message. Not yet built; verified at the head of the cut. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
70d0cef421
commit
d427b0e268
3 changed files with 79 additions and 24 deletions
|
|
@ -73,8 +73,8 @@ pub fn run(
|
|||
Ok(())
|
||||
}
|
||||
(Err(write), Ok(())) => Err(write.context("the brake was not written; the units were stopped")),
|
||||
(Ok(()), Err(stop)) => Err(stop.context("the brake is held; the units were not stopped")),
|
||||
(Err(write), Err(stop)) => Err(anyhow!("the brake was not written ({write:#}) and the units were not stopped ({stop:#})")),
|
||||
(Ok(()), Err(stop)) => Err(stop.context("the brake is held; the stop failed")),
|
||||
(Err(write), Err(stop)) => Err(anyhow!("the brake was not written ({write:#}) and the stop failed ({stop:#})")),
|
||||
}
|
||||
}
|
||||
["brake", "release"] => ControlWriter::open(&path)?.set_brake(true, now, set_by),
|
||||
|
|
|
|||
Loading…
Reference in a new issue