summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-server-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-install/ipa-server-install')
-rw-r--r--ipa-server/ipa-install/ipa-server-install31
1 files changed, 21 insertions, 10 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index aac4123c..b698d682 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -75,6 +75,8 @@ def parse_options():
default=False, help="unattended installation never prompts the user")
parser.add_option("", "--uninstall", dest="uninstall", action="store_true",
default=False, help="uninstall an existing installation")
+ parser.add_option("-N", "--no-ntp", dest="conf_ntp", action="store_false",
+ help="do not configure ntp", default=True)
options, args = parser.parse_args()
@@ -188,7 +190,7 @@ def read_ds_user():
print "will give this user/group some permissions in specific paths/files"
print "to perform server-specific operations."
print ""
-
+
ds_user = ""
try:
pwd.getpwnam('dirsrv')
@@ -307,7 +309,7 @@ def main():
if os.getegid() != 0:
print "Must be root to setup server"
return
-
+
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGINT, signal_handler)
@@ -320,11 +322,11 @@ def main():
print "This program will setup the FreeIPA Server."
print ""
print "This includes:"
+ print " * Configure the Network Time Daemon (ntpd)"
print " * Create and configure an instance of Directory Server"
print " * Create and configure a Kerberos Domain Controller (KDC)"
print " * Configure Apache (httpd)"
print " * Configure TurboGears"
- print " * Configure the Network Time Daemon (ntpd)"
print ""
print "To accept the default shown in brackets, press the Enter key."
print ""
@@ -357,7 +359,7 @@ def main():
host_default = options.host_name
else:
host_default = get_fqdn()
-
+
if options.unattended:
try:
verify_fqdn(host_default)
@@ -397,7 +399,7 @@ def main():
print "from the one provided on the command line. Please fix your DNS"
print "or /etc/hosts file and restart the installation."
return "-Fatal Error-"
-
+
if options.unattended:
if not ip:
print "Unable to resolve IP address"
@@ -445,6 +447,11 @@ def main():
print "The following operations may take some minutes to complete."
print "Please wait until the prompt is returned."
+ # Configure ntpd
+ if options.conf_ntp:
+ ntp = ipaserver.ntpinstance.NTPInstance()
+ ntp.create_instance()
+
# Create a directory server instance
ds = ipaserver.dsinstance.DsInstance()
ds.create_instance(ds_user, realm_name, host_name, domain_name, dm_password)
@@ -479,14 +486,10 @@ def main():
# Restart ds and krb after configurations have been changed
service.print_msg("restarting the directory server")
ds.restart()
-
+
service.print_msg("restarting the KDC")
krb.restart()
- # Configure ntpd
- ntp = ipaserver.ntpinstance.NTPInstance()
- ntp.create_instance()
-
# Set the admin user kerberos password
ds.change_admin_password(admin_password)
@@ -498,6 +501,14 @@ def main():
fd.write("realm=" + realm_name + "\n")
fd.close()
+ # Call client install script
+ try:
+ run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name])
+ except Exception, e:
+ print "Configuration of client side components failed!"
+ print "ipa-client-install returned: " + str(e)
+ return "-Fatal Error-"
+
print "=============================================================================="
print "Setup complete"
print ""