mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 06:19:44 +00:00
only set static hostname
This commit is contained in:
committed by
Matt Hill
parent
fc142cfde8
commit
3137387c0c
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user