diff options
author | Karl MacMillan <kmacmill@redhat.com> | 2007-11-01 15:35:02 -0400 |
---|---|---|
committer | Karl MacMillan <kmacmill@redhat.com> | 2007-11-01 15:35:02 -0400 |
commit | 36e43aed1bb9d4ee94cdc8396123db48987ada46 (patch) | |
tree | 9ab148023791a6076d825a1d1178af4137f358d8 /ipa-client/ipa-install/ipa-client-install | |
parent | 6a0ca23577813a1534298f1af4dfa03c2bfcfc1a (diff) | |
download | freeipa-36e43aed1bb9d4ee94cdc8396123db48987ada46.tar.gz freeipa-36e43aed1bb9d4ee94cdc8396123db48987ada46.tar.xz freeipa-36e43aed1bb9d4ee94cdc8396123db48987ada46.zip |
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.
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rw-r--r-- | ipa-client/ipa-install/ipa-client-install | 17 |
1 files changed, 5 insertions, 12 deletions
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 |