diff options
author | Martin Basti <mbasti@redhat.com> | 2015-04-15 14:32:17 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-04-24 15:36:07 +0200 |
commit | e55d8ee5d4649b2fd35aa6f29ed2a8f60088d1a8 (patch) | |
tree | 8fa4830aed741d7b8a3e06a1a531cd990e79b660 /ipa-client/ipa-install | |
parent | e395bdb911ebf69fbf6b3e1c9e0e148a9600bd90 (diff) | |
download | freeipa-e55d8ee5d4649b2fd35aa6f29ed2a8f60088d1a8.tar.gz freeipa-e55d8ee5d4649b2fd35aa6f29ed2a8f60088d1a8.tar.xz freeipa-e55d8ee5d4649b2fd35aa6f29ed2a8f60088d1a8.zip |
ipa client: use NTP servers detected from SRV
Detected NTP servers from SRV records should be used in NTP client
configuration.
https://fedorahosted.org/freeipa/ticket/4981
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipa-client/ipa-install')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index b3444cf9b..43d5ae8dc 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -2340,6 +2340,7 @@ def install(options, env, fstore, statestore): # hostname if different from system hostname tasks.backup_and_replace_hostname(fstore, statestore, options.hostname) + ntp_srv_servers = [] if not options.on_master and options.conf_ntp: # Attempt to sync time with IPA server. # If we're skipping NTP configuration, we also skip the time sync here. @@ -2852,10 +2853,16 @@ def install(options, env, fstore, statestore): # disable other time&date services first if options.force_ntpd: ipaclient.ntpconf.force_ntpd(statestore) - if options.ntp_servers: + + if options.ntp_server: ntp_servers = options.ntp_servers + elif ntp_srv_servers: + ntp_servers = ntp_srv_servers else: + root_logger.warning("No SRV records of NTP servers found. IPA " + "server address will be used") ntp_servers = cli_server + ipaclient.ntpconf.config_ntp(ntp_servers, fstore, statestore) root_logger.info("NTP enabled") |