From ad7f98335bfac9af58c74056444229377304cd04 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Fri, 18 May 2018 11:14:42 +0900 Subject: host-name: Add --static option to hostnamectl --- src/conf_mode/host_name.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/conf_mode/host_name.py') 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") -- cgit v1.2.3