bugfix:修改设置hostname后,重启后hostname不生效的bug

This commit is contained in:
fumingwei
2021-09-20 21:28:27 +08:00
parent cdabffaed4
commit 1e42442791

View File

@@ -2,6 +2,10 @@
status_address_add_ipv4=0
status_address_add_ipv6=0
status_route_add_ipv4=0
static_hostname=$(hostnamectl status --static)
hostnamectl set-hostname $static_hostname --transient --pretty
ifconfig eth_ctl {{ network_setting.nic_policy_log.ipv4 }}
status_address_add_ipv4=$?
if [ $status_address_add_ipv4 -ne 0 ]; then