A worker linked on the FreeBSD 15 test guest needs FBSD_1.9 and does not load on OPNsense 24.7; the agent then retried the job session every 30 s and never sent a heartbeat or inventory. The agent now pauses script capabilities for an hour and reconnects without them. tools/dev_opnsense_worker.py links the worker against the official FreeBSD 14.1 pkgbase libraries. The installer checks that the worker loads before binding it and reports success only after a heartbeat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
732 B
Rust
26 lines
732 B
Rust
#[cfg(target_os = "freebsd")]
|
|
mod native;
|
|
#[cfg(target_os = "freebsd")]
|
|
mod root;
|
|
#[cfg(target_os = "freebsd")]
|
|
fn main() -> anyhow::Result<()> {
|
|
match std::env::args().nth(1).as_deref() {
|
|
Some("--root-helper") => root::serve(),
|
|
// Loader check for installers: resolves every symbol against this system's libc.
|
|
Some("--version") => {
|
|
println!("{}", env!("CARGO_PKG_VERSION"));
|
|
Ok(())
|
|
}
|
|
Some("--root-capabilities") => {
|
|
println!("{}", serde_json::to_string(&root::caps()?)?);
|
|
Ok(())
|
|
}
|
|
_ => native::main(),
|
|
}
|
|
}
|
|
#[cfg(not(target_os = "freebsd"))]
|
|
fn main() {
|
|
eprintln!("FreeBSD required");
|
|
std::process::exit(1);
|
|
}
|