mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
server install: redirect ipa-client-install output to standard output
https://fedorahosted.org/freeipa/ticket/5527 Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
parent
f49cdfe392
commit
c856401478
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user