summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaserver/install/server/install.py13
-rw-r--r--ipaserver/install/server/replicainstall.py18
2 files changed, 15 insertions, 16 deletions
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 540ce20bd..a07ca664e 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -991,10 +991,10 @@ def install(installer):
args.append("--no-sshd")
if options.mkhomedir:
args.append("--mkhomedir")
- run(args)
+ run(args, redirect_output=True)
+ print()
except Exception as e:
- sys.exit("Configuration of client side components failed!\n"
- "ipa-client-install returned: " + str(e))
+ sys.exit("Configuration of client side components failed!")
# Everything installed properly, activate ipa service.
services.knownservices.ipa.enable()
@@ -1251,13 +1251,12 @@ def uninstall(installer):
try:
result = run([paths.IPA_CLIENT_INSTALL, "--on-master",
"--unattended", "--uninstall"],
- raiseonerr=False, capture_output=True)
+ raiseonerr=False, redirect_output=True)
if result.returncode not in [0, 2]:
- raise RuntimeError(result.output)
- except Exception as e:
+ raise RuntimeError("Failed to configure the client")
+ except Exception:
rv = 1
print("Uninstall of client side components failed!")
- print("ipa-client-install returned: " + str(e))
sys.exit(rv)
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index d62edd17d..c6927a5d9 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -409,7 +409,8 @@ def uninstall_client():
print("Removing client side components")
ipautil.run([paths.IPA_CLIENT_INSTALL, "--unattended", "--uninstall"],
- raiseonerr=False)
+ raiseonerr=False, redirect_output=True)
+ print()
def promote_sssd(host_name):
@@ -794,10 +795,10 @@ def install(installer):
args.append("--no-sshd")
if options.mkhomedir:
args.append("--mkhomedir")
- ipautil.run(args)
- except Exception as e:
+ ipautil.run(args, redirect_output=True)
+ print()
+ except Exception:
print("Configuration of client side components failed!")
- print("ipa-client-install returned: " + str(e))
raise RuntimeError("Failed to configure the client")
ds.replica_populate()
@@ -859,11 +860,10 @@ def ensure_enrolled(installer):
if installer.mkhomedir:
args.append("--mkhomedir")
- ipautil.run(args, stdin=stdin)
-
- except Exception as e:
- sys.exit("Configuration of client side components failed!\n"
- "ipa-client-install returned: " + str(e))
+ ipautil.run(args, stdin=stdin, redirect_output=True)
+ print()
+ except Exception:
+ sys.exit("Configuration of client side components failed!")
@common_cleanup
@preserve_enrollment_state