only set static hostname

This commit is contained in:
Aiden McClelland
2023-06-08 16:56:09 -06:00
committed by Matt Hill
parent fc142cfde8
commit 3137387c0c

View File

@@ -56,7 +56,8 @@ pub async fn get_current_hostname() -> Result<Hostname, Error> {
#[instrument(skip_all)] #[instrument(skip_all)]
pub async fn set_hostname(hostname: &Hostname) -> Result<(), Error> { pub async fn set_hostname(hostname: &Hostname) -> Result<(), Error> {
let hostname: &String = &hostname.0; let hostname: &String = &hostname.0;
let _out = Command::new("hostnamectl") Command::new("hostnamectl")
.arg("--static")
.arg("set-hostname") .arg("set-hostname")
.arg(hostname) .arg(hostname)
.invoke(ErrorKind::ParseSysInfo) .invoke(ErrorKind::ParseSysInfo)