Debian: Hostname always updated

This commit is contained in:
Jonathan Leroy 2015-05-11 20:59:08 +02:00
parent b79fed3a92
commit 5ff749e487

View File

@ -1808,7 +1808,8 @@ def build_network_settings(**settings):
# Write hostname to /etc/hostname # Write hostname to /etc/hostname
sline = opts['hostname'].split('.', 1) sline = opts['hostname'].split('.', 1)
hostname = '{0}\n' . format(sline[0]) opts['hostname'] = sline[0]
hostname = '{0}\n' . format(opts['hostname'])
current_domainname = current_network_settings['domainname'] current_domainname = current_network_settings['domainname']
# Only write the hostname if it has changed # Only write the hostname if it has changed