summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-07-28 16:13:55 +0200
committerJan Cholasta <jcholast@redhat.com>2016-08-10 10:48:05 +0200
commit80e544e7a98ff22469e9d3a4f7bda2ed234601aa (patch)
treef0c3514d94b47417089baa3859b03d0a7f1026d7 /client
parenta83523e37ee70a10e49b40f8880c2d0fb3088562 (diff)
downloadfreeipa-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 'client')
-rwxr-xr-xclient/ipa-client-install3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/ipa-client-install b/client/ipa-client-install
index 05b6b6e0d..4a263b3d0 100755
--- a/client/ipa-client-install
+++ b/client/ipa-client-install
@@ -2525,7 +2525,8 @@ def install(options, env, fstore, statestore):
if options.hostname and not options.on_master:
# skip this step when run by ipa-server-install as it always configures
# hostname
- tasks.backup_and_replace_hostname(fstore, statestore, options.hostname)
+ tasks.backup_hostname(fstore, statestore)
+ tasks.set_hostname(options.hostname)
ntp_srv_servers = []
if not options.on_master and options.conf_ntp: