Workaround for service starting before hwmon paths
Let the service fail when there are no hwmon paths yet.
This commit is contained in:
parent
e5cac912c1
commit
0539f0b515
@ -145,6 +145,9 @@ fn controllers(config: &Config, filter: bool) -> std::io::Result<Vec<HwMon>> {
|
||||
|
||||
fn service(config: Config) -> std::io::Result<()> {
|
||||
let mut controllers = controllers(&config, true)?;
|
||||
if controllers.len() < 1 {
|
||||
return Err(not_found());
|
||||
}
|
||||
let mut cache = std::collections::HashMap::new();
|
||||
loop {
|
||||
for hw_mon in controllers.iter_mut() {
|
||||
|
Loading…
Reference in New Issue
Block a user