CI: use /tmp for ecosystem clone; fix rustfmt violations
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
This commit is contained in:
parent
d177cc8d82
commit
8aceab7857
4 changed files with 20 additions and 13 deletions
|
|
@ -119,7 +119,9 @@ pub fn run(cfg: &Config, profile_name: &str) -> Outcome {
|
|||
on_bootstrap = true;
|
||||
log(&format!("bootstrap connected: {}", bdef.ssid));
|
||||
}
|
||||
Err(e) => log(&format!("bootstrap connect failed: {} — {e}", bdef.ssid)),
|
||||
Err(e) => {
|
||||
log(&format!("bootstrap connect failed: {} — {e}", bdef.ssid))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log(&format!("bootstrap not in range: {}", bdef.ssid));
|
||||
|
|
|
|||
10
src/nm.rs
10
src/nm.rs
|
|
@ -319,7 +319,15 @@ pub fn connect_verbose(iface: &str, net: &NetworkDef, wait: u32, dns: &str) -> R
|
|||
}
|
||||
let o = run(
|
||||
"nmcli",
|
||||
&["--wait", &wait_s, "connection", "up", &profile, "ifname", iface],
|
||||
&[
|
||||
"--wait",
|
||||
&wait_s,
|
||||
"connection",
|
||||
"up",
|
||||
&profile,
|
||||
"ifname",
|
||||
iface,
|
||||
],
|
||||
Duration::from_secs(wait as u64 + 15),
|
||||
);
|
||||
if !o.success {
|
||||
|
|
|
|||
|
|
@ -65,9 +65,8 @@ fn spawn_nm_monitor(tx: mpsc::Sender<()>) {
|
|||
let mut last = Instant::now() - Duration::from_secs(10);
|
||||
for line in reader.lines().map_while(Result::ok) {
|
||||
let l = line.to_lowercase();
|
||||
let interesting = l.contains("disconnect")
|
||||
|| l.contains("unavailable")
|
||||
|| l.contains("failed");
|
||||
let interesting =
|
||||
l.contains("disconnect") || l.contains("unavailable") || l.contains("failed");
|
||||
if interesting && last.elapsed() > Duration::from_millis(1500) {
|
||||
last = Instant::now();
|
||||
let _ = tx.send(());
|
||||
|
|
@ -199,7 +198,9 @@ pub fn run(mut cfg: Config, run_initial: bool) -> i32 {
|
|||
Urgency::Normal,
|
||||
);
|
||||
}
|
||||
let elapsed = last_flow_at.map(|t| t.elapsed().as_secs()).unwrap_or(u64::MAX);
|
||||
let elapsed = last_flow_at
|
||||
.map(|t| t.elapsed().as_secs())
|
||||
.unwrap_or(u64::MAX);
|
||||
if elapsed >= FLOW_COOLDOWN {
|
||||
log(&format!(
|
||||
"watch: down ({:?}) profile={profile} ssid={:?} — running flow",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue