mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
* adds avahi base service to init function of mdns controller * Apply suggestions from code review * adds hostname set to startup sequence * Apply suggestions from code review Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
26 lines
613 B
Rust
26 lines
613 B
Rust
use embassy::Error;
|
|
|
|
async fn inner_main() -> Result<(), Error> {
|
|
// os sync
|
|
embassy::volume::disk::mount("/dev/sda", "/mnt/embassy-os-crypt").await?;
|
|
|
|
// hostname-set
|
|
embassy::hostname::sync_hostname().await?;
|
|
|
|
Ok(())
|
|
}
|
|
|
|
fn main() {
|
|
let rt = tokio::runtime::Runtime::new().expect("failed to initialize runtime");
|
|
match rt.block_on(inner_main()) {
|
|
Ok(_) => (),
|
|
Err(e) => {
|
|
drop(rt);
|
|
eprintln!("{}", e.source);
|
|
log::debug!("{:?}", e.source);
|
|
drop(e.source);
|
|
std::process::exit(e.kind as i32)
|
|
}
|
|
}
|
|
}
|