From 36e43aed1bb9d4ee94cdc8396123db48987ada46 Mon Sep 17 00:00:00 2001 From: Karl MacMillan Date: Thu, 1 Nov 2007 15:35:02 -0400 Subject: NTP configuration for client and server. Configure ipa servers as an ntp server and clients to (by default) us the ipa server as an ntp server. Also corrected the messages about which ports should be opened. --- ipa-client/ipa-install/ipa-client-install | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'ipa-client/ipa-install/ipa-client-install') diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 0e89a66b5..3e3597dca 100644 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -30,6 +30,7 @@ import logging from optparse import OptionParser import ipaclient.ipadiscovery import ipaclient.ipachangeconf +import ipaclient.ntpconf from ipa.ipautil import run def parse_options(): @@ -43,6 +44,8 @@ def parse_options(): default=False, help="print debugging information") parser.add_option("-U", "--unattended", dest="unattended", help="unattended installation never prompts the user") + parser.add_option("-N", "--no-ntp", action="store_false", + help="do not configure ntp", default=True, dest="conf_ntp") options, args = parser.parse_args() @@ -67,14 +70,6 @@ def logging_setup(options): console.setFormatter(formatter) logging.getLogger('').addHandler(console) -def check_ntp(): - ret_code = 1 - p = subprocess.Popen(["/sbin/service", "ntpd", "status"], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - stdout, stderr = p.communicate() - - return p.returncode - def main(): options = parse_options() logging_setup(options) @@ -208,10 +203,8 @@ def main(): #Modify pam to add pam_krb5 run(["/usr/sbin/authconfig", "--enablekrb5", "--update"]) - # print warning about ntp - if check_ntp() != 0: - print "WARNING: Kerberos requires time synchronization between clients" - print "and servers for correct operation. You should consider enabling ntpd." + if options.conf_ntp: + ipaclient.ntpconf.config_ntp(ds.getServerName()) return 0 -- cgit