summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuya Kusakabe <yuya.kusakabe@gmail.com>2018-05-18 11:14:42 +0900
committerYuya Kusakabe <yuya.kusakabe@gmail.com>2018-05-18 11:14:42 +0900
commitad7f98335bfac9af58c74056444229377304cd04 (patch)
treedb849d92db63e81f1d5e9352a8c4ba093ffcb214
parent7fe003f3bdedd60d235134693e345d3fd6fbb1cb (diff)
downloadvyos-1x-ad7f98335bfac9af58c74056444229377304cd04.tar.gz
vyos-1x-ad7f98335bfac9af58c74056444229377304cd04.zip
host-name: Add --static option to hostnamectl
-rwxr-xr-xsrc/conf_mode/host_name.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index 11612637c..3b3958f7f 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -98,7 +98,7 @@ def generate(config):
def apply(config):
"""Apply configuration"""
- os.system("hostnamectl set-hostname {0}".format(config["fqdn"]))
+ os.system("hostnamectl set-hostname --static {0}".format(config["fqdn"]))
# restart services that use the hostname
os.system("systemctl restart rsyslog.service")