diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/host_name.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 030735215..32ae4526f 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -98,7 +98,8 @@ def generate(config): def apply(config): """Apply configuration""" - os.system("hostnamectl set-hostname --static {0}".format(config["fqdn"])) + fqdn = config["fqdn"] + os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) # Restart services that use the hostname os.system("systemctl restart rsyslog.service") |