diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-09-04 05:15:31 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-09-04 18:32:04 +0200 |
commit | 5bcbe1df3719eab06eebd930bef0077c34fc5b38 (patch) | |
tree | 9db37729686c71407f13bacaa65edea15a4ca36f /ipa-client | |
parent | ed44de17ff1ec8f5f85b925cb9169e5455967d1f (diff) | |
download | freeipa-5bcbe1df3719eab06eebd930bef0077c34fc5b38.tar.gz freeipa-5bcbe1df3719eab06eebd930bef0077c34fc5b38.tar.xz freeipa-5bcbe1df3719eab06eebd930bef0077c34fc5b38.zip |
Run ntpdate in verbose mode, not debug (i.e. no-op) mode
Remove the debug argument to synconce_ntp since we always want the logs
to be verbose.
https://fedorahosted.org/freeipa/ticket/3048
Diffstat (limited to 'ipa-client')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 4 | ||||
-rw-r--r-- | ipa-client/ipaclient/ntpconf.py | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 2e65921e8..d87fcc2a6 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -1421,11 +1421,11 @@ def install(options, env, fstore, statestore): synced_ntp = False if ntp_servers: for s in ntp_servers: - synced_ntp = ipaclient.ntpconf.synconce_ntp(s, debug=True) + synced_ntp = ipaclient.ntpconf.synconce_ntp(s) if synced_ntp: break if not synced_ntp: - synced_ntp = ipaclient.ntpconf.synconce_ntp(cli_server[0], debug=True) + synced_ntp = ipaclient.ntpconf.synconce_ntp(cli_server[0]) if not synced_ntp: root_logger.warning("Unable to sync time with IPA NTP " + "server, assuming the time is in sync.") diff --git a/ipa-client/ipaclient/ntpconf.py b/ipa-client/ipaclient/ntpconf.py index aa9261cb2..6e4173145 100644 --- a/ipa-client/ipaclient/ntpconf.py +++ b/ipa-client/ipaclient/ntpconf.py @@ -133,7 +133,8 @@ def config_ntp(server_fqdn, fstore = None, sysstore = None): # Restart ntpd ipaservices.knownservices.ntpd.restart() -def synconce_ntp(server_fqdn, debug=False): + +def synconce_ntp(server_fqdn): """ Syncs time with specified server using ntpdate. Primarily designed to be used before Kerberos setup @@ -145,11 +146,8 @@ def synconce_ntp(server_fqdn, debug=False): if os.path.exists(ntpdate): # retry several times -- logic follows /etc/init.d/ntpdate # implementation - cmd = [ntpdate, "-U", "ntp", "-s", "-b"] - if debug: - cmd.append('-d') - cmd.append(server_fqdn) - for retry in range(0,3): + cmd = [ntpdate, "-U", "ntp", "-s", "-b", "-v", server_fqdn] + for retry in range(0, 3): try: ipautil.run(cmd) return True |