diff options
author | Petr Spacek <pspacek@redhat.com> | 2016-07-28 16:13:55 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-08-10 10:48:05 +0200 |
commit | 80e544e7a98ff22469e9d3a4f7bda2ed234601aa (patch) | |
tree | f0c3514d94b47417089baa3859b03d0a7f1026d7 /ipaplatform/base | |
parent | a83523e37ee70a10e49b40f8880c2d0fb3088562 (diff) | |
download | freeipa-80e544e7a98ff22469e9d3a4f7bda2ed234601aa.tar.gz freeipa-80e544e7a98ff22469e9d3a4f7bda2ed234601aa.tar.xz freeipa-80e544e7a98ff22469e9d3a4f7bda2ed234601aa.zip |
install: Call hostnamectl set-hostname only if --hostname option is used
This commit also splits hostname backup and configuration into two separate
functions. This allows us to backup hostname without setting it at the
same time.
https://fedorahosted.org/freeipa/ticket/6071
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaplatform/base')
-rw-r--r-- | ipaplatform/base/tasks.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ipaplatform/base/tasks.py b/ipaplatform/base/tasks.py index c6860ce47..1e687b618 100644 --- a/ipaplatform/base/tasks.py +++ b/ipaplatform/base/tasks.py @@ -45,14 +45,11 @@ class BaseTaskNamespace(object): raise NotImplementedError() - def backup_and_replace_hostname(self, fstore, statestore, hostname): + def backup_hostname(self, fstore, statestore): """ Backs up the current hostname in the statestore (so that it can be restored by the restore_hostname platform task). - Makes sure that new hostname (passed via hostname argument) is set - as a new pemanent hostname for this host. - No return value expected. """ @@ -109,7 +106,7 @@ class BaseTaskNamespace(object): def restore_hostname(self, fstore, statestore): """ Restores the original hostname as backed up in the - backup_and_replace_hostname platform task. + backup_hostname platform task. """ raise NotImplementedError() |