summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2008-02-20 10:16:19 -0500
committerSimo Sorce <ssorce@redhat.com>2008-02-20 10:16:19 -0500
commit46cb6e9bdd74d217ac510576a4114bacb7adfb12 (patch)
tree65a4283130ff148c0864775b4ae028bead79d243 /ipa-server/ipa-install
parentda24953f9ad8676b684dd483441b3c848a0ce4a3 (diff)
downloadfreeipa-46cb6e9bdd74d217ac510576a4114bacb7adfb12.tar.gz
freeipa-46cb6e9bdd74d217ac510576a4114bacb7adfb12.tar.xz
freeipa-46cb6e9bdd74d217ac510576a4114bacb7adfb12.zip
Run ipa-client-install after server install bits
Diffstat (limited to 'ipa-server/ipa-install')
-rw-r--r--ipa-server/ipa-install/ipa-replica-install15
-rw-r--r--ipa-server/ipa-install/ipa-server-install18
2 files changed, 24 insertions, 9 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-install b/ipa-server/ipa-install/ipa-replica-install
index 93cfc8642..0fb0a5656 100644
--- a/ipa-server/ipa-install/ipa-replica-install
+++ b/ipa-server/ipa-install/ipa-replica-install
@@ -134,7 +134,7 @@ def main():
installutils.standard_logging_setup("ipareplica-install.log", options.debug)
top_dir, dir = expand_info(filename)
-
+
config = ReplicaConfig()
read_info(dir, config)
config.host_name = get_host_name()
@@ -172,7 +172,7 @@ def main():
sys.exit("\nThe password provided is incorrect for LDAP server %s" % config.master_host_name)
install_ds(config)
-
+
repl = replication.ReplicationManager(config.host_name, config.dirman_password)
if repl is None:
raise RuntimeError("Unable to connect to LDAP server %s." % config.host_name)
@@ -184,7 +184,7 @@ def main():
install_krb(config)
install_http(config)
-
+
# Create a Web Gui instance
webgui = httpinstance.WebGuiInstance()
webgui.create_instance()
@@ -195,7 +195,14 @@ def main():
service.restart("dirsrv")
service.restart("krb5kdc")
-
+
+ # Call client install script
+ try:
+ run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", config.domain_name, "--server", config.host_name, "--realm", config.realm_name])
+ except Exception, e:
+ print "Configuration of client side components failed!"
+ print "ipa-client-install returned: " + str(e)
+ raise RuntimeError("Failed to configure the client")
try:
if not os.geteuid()==0:
sys.exit("\nYou must be root to run this script.\n")
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index aac4123c6..b873de426 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -188,7 +188,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 +307,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)
@@ -357,7 +357,7 @@ def main():
host_default = options.host_name
else:
host_default = get_fqdn()
-
+
if options.unattended:
try:
verify_fqdn(host_default)
@@ -397,7 +397,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"
@@ -479,7 +479,7 @@ 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()
@@ -498,6 +498,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 ""