Improve handling of options in ipa-client-install

Improve handling of command line options related to forced client re-enrollment
in ipa-client-install:

* Make --keytab and --principal options mutually exclusive.
* Warn that using --force-join together with --keytab provides no additional
  functionality.

https://fedorahosted.org/freeipa/ticket/3686
This commit is contained in:
Ana Krivokapic 2013-06-05 15:52:47 +02:00 committed by Martin Kosek
parent 7eb6d8cb14
commit caf40e76cd

View File

@ -1844,6 +1844,15 @@ def install(options, env, fstore, statestore):
"nss_ldap or nss-pam-ldapd")
return CLIENT_INSTALL_ERROR
if options.keytab and options.principal:
root_logger.error("Options 'principal' and 'keytab' cannot be used "
"together.")
return CLIENT_INSTALL_ERROR
if options.keytab and options.force_join:
root_logger.warning("Option 'force-join' has no additional effect "
"when used with together with option 'keytab'.")
# Create the discovery instance
ds = ipadiscovery.IPADiscovery()