mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Log interactive options in install scripts
This commit is contained in:
committed by
Rob Crittenden
parent
53d1553755
commit
d9dd838014
@@ -504,6 +504,7 @@ def main():
|
||||
safe_options, options = parse_options()
|
||||
logging_setup(options)
|
||||
logging.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
logging.debug("missing options might be asked for interactively later\n")
|
||||
dnsok = False
|
||||
env={"PATH":"/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"}
|
||||
|
||||
@@ -547,6 +548,7 @@ def main():
|
||||
else:
|
||||
print "DNS discovery failed to determine your DNS domain"
|
||||
cli_domain = user_input("Please provide the domain name of your IPA server (ex: example.com)", allow_empty = False)
|
||||
logging.debug("will use domain: %s\n", cli_domain)
|
||||
if options.on_master:
|
||||
ret = ds.search(domain=options.domain, server=options.server)
|
||||
else:
|
||||
@@ -554,6 +556,7 @@ def main():
|
||||
if not cli_domain:
|
||||
if ds.getDomainName():
|
||||
cli_domain = ds.getDomainName()
|
||||
logging.debug("will use domain: %s\n", cli_domain)
|
||||
|
||||
if ret == -2 or not ds.getServerName():
|
||||
logging.debug("IPA Server not found")
|
||||
@@ -564,12 +567,14 @@ def main():
|
||||
else:
|
||||
print "DNS discovery failed to find the IPA Server"
|
||||
cli_server = user_input("Please provide your IPA server name (ex: ipa.example.com)", allow_empty = False)
|
||||
logging.debug("will use server: %s\n", cli_server)
|
||||
ret = ds.search(domain=cli_domain, server=cli_server)
|
||||
else:
|
||||
dnsok = True
|
||||
if not cli_server:
|
||||
if ds.getServerName():
|
||||
cli_server = ds.getServerName()
|
||||
logging.debug("will use server: %s\n", cli_server)
|
||||
|
||||
if ret != 0:
|
||||
print "Failed to verify that "+cli_server+" is an IPA Server."
|
||||
@@ -595,7 +600,9 @@ def main():
|
||||
return -3
|
||||
|
||||
cli_realm = ds.getRealmName()
|
||||
logging.debug("will use cli_realm: %s\n", cli_realm)
|
||||
cli_basedn = ds.getBaseDN()
|
||||
logging.debug("will use cli_basedn: %s\n", cli_basedn)
|
||||
subject_base = "O=%s" % ds.getRealmName()
|
||||
|
||||
print "Realm: "+cli_realm
|
||||
@@ -610,6 +617,7 @@ def main():
|
||||
if not options.unattended:
|
||||
if options.principal is None and options.password is None and options.prompt_password is False:
|
||||
options.principal = user_input("Enrollment principal", allow_empty=False)
|
||||
logging.debug("will use principal: %s\n", options.principal)
|
||||
|
||||
# Get the CA certificate
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user