Files
start-os/appmgr/src/bin/embassy-init.rs
Keagan McClelland 1ff0db0b84 adds avahi base service to init function of mdns controller (#407)
* 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>
2021-08-19 11:42:17 -06:00

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)
}
}
}