summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-client/ipa-install')
-rw-r--r--ipa-client/ipa-install/ipa-client-install17
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