Do not initialize API in ipa-client-automount uninstall

API is not needed in uninstallation, it may only produce errors.

https://fedorahosted.org/freeipa/ticket/6072

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Martin Basti 2016-07-28 09:47:39 +02:00
parent 63a91ca49a
commit 2d4d1a9dc0

View File

@ -378,6 +378,9 @@ def main():
paths.IPACLIENT_INSTALL_LOG, verbose=False, debug=options.debug,
filemode='a', console_format='%(message)s')
if options.uninstall:
return uninstall(fstore, statestore)
cfg = dict(
context='cli_installer',
in_server=False,
@ -392,9 +395,6 @@ def main():
if os.path.exists(paths.IPA_CA_CRT):
ca_cert_path = paths.IPA_CA_CRT
if options.uninstall:
return uninstall(fstore, statestore)
if statestore.has_state('autofs'):
sys.exit('automount is already configured on this system.\n')