fix get_hostname (#987)

This commit is contained in:
Aiden McClelland
2021-12-22 08:33:24 -07:00
parent faf2f8731f
commit 7277b430a1

View File

@@ -9,6 +9,11 @@ pub const PRODUCT_KEY_PATH: &'static str = "/embassy-os/product_key.txt";
#[instrument]
pub async fn get_hostname() -> Result<String, Error> {
Ok(format!("embassy-{}", get_id().await?))
}
#[instrument]
pub async fn get_current_hostname() -> Result<String, Error> {
let out = Command::new("hostname")
.invoke(ErrorKind::ParseSysInfo)
.await?;