mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
Cleanup hostname change fix and clarify log message
This commit is contained in:
parent
063190a00c
commit
3fa243ef5b
@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
permissions. Also switch to new setup command.
|
permissions. Also switch to new setup command.
|
||||||
- Include module static files in build, required for Debian package build.
|
- Include module static files in build, required for Debian package build.
|
||||||
- dynamicdns: Allow reading status as non-root.
|
- dynamicdns: Allow reading status as non-root.
|
||||||
|
- config: Set current domainname again after hostname change.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- repro: Use firewalld provided SIP services.
|
- repro: Use firewalld provided SIP services.
|
||||||
|
|||||||
@ -234,7 +234,7 @@ def _apply_changes(request, old_status, new_status):
|
|||||||
def set_hostname(hostname):
|
def set_hostname(hostname):
|
||||||
"""Sets machine hostname to hostname"""
|
"""Sets machine hostname to hostname"""
|
||||||
old_hostname = get_hostname()
|
old_hostname = get_hostname()
|
||||||
old_domainname = get_domainname()
|
domainname = get_domainname()
|
||||||
|
|
||||||
# Hostname should be ASCII. If it's unicode but passed our
|
# Hostname should be ASCII. If it's unicode but passed our
|
||||||
# valid_hostname check, convert to ASCII.
|
# valid_hostname check, convert to ASCII.
|
||||||
@ -251,13 +251,10 @@ def set_hostname(hostname):
|
|||||||
old_hostname=old_hostname,
|
old_hostname=old_hostname,
|
||||||
new_hostname=hostname)
|
new_hostname=hostname)
|
||||||
|
|
||||||
# Domain name should be ASCII. If it's unicode, convert to ASCII.
|
LOGGER.info('Setting domain name after hostname change - %s', domainname)
|
||||||
domainname = old_domainname
|
|
||||||
|
|
||||||
LOGGER.info('Changing domain name to - %s', domainname)
|
|
||||||
actions.superuser_run('domainname-change', [domainname])
|
actions.superuser_run('domainname-change', [domainname])
|
||||||
|
|
||||||
|
|
||||||
def set_domainname(domainname):
|
def set_domainname(domainname):
|
||||||
"""Sets machine domain name to domainname"""
|
"""Sets machine domain name to domainname"""
|
||||||
old_domainname = get_domainname()
|
old_domainname = get_domainname()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user