One-shot daemons shouldn't be considered ready at all, just complete

This commit is contained in:
Tony Garnock-Jones 2022-02-03 22:56:20 +01:00
parent 99a027dc26
commit 28b0c5b4d5
1 changed files with 1 additions and 2 deletions

View File

@ -139,7 +139,7 @@ impl DaemonProcessSpec {
},
DaemonProcessSpec::OneShot { setup } => FullDaemonProcess {
process: Process::Simple(setup).elaborate(),
ready_on_start: ReadyOnStart::Absent,
ready_on_start: ReadyOnStart::Present { ready_on_start: false },
restart: RestartField::Present { restart: Box::new(RestartPolicy::OnError) },
protocol: ProtocolField::Absent,
},
@ -212,7 +212,6 @@ impl DaemonInstance {
t.facet(|t| {
let _ = t.prevent_inert_check();
counter::adjust(t, &self.completed_processes, 1);
counter::adjust(t, &self.unready_configs, -1);
Ok(())
})?;
()