From 9ab402c4954f338927ae653b6e403f5950e742e7 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 18 Sep 2014 10:52:56 +0200 Subject: Check if IPA client is configured in ipa-certupdate https://fedorahosted.org/freeipa/ticket/4460 Reviewed-By: Rob Crittenden --- ipa-client/ipaclient/ipa_certupdate.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ipa-client') diff --git a/ipa-client/ipaclient/ipa_certupdate.py b/ipa-client/ipaclient/ipa_certupdate.py index 8259755b3..c25dcaed8 100644 --- a/ipa-client/ipaclient/ipa_certupdate.py +++ b/ipa-client/ipaclient/ipa_certupdate.py @@ -41,6 +41,12 @@ class CertUpdate(admintool.AdminTool): super(CertUpdate, self).validate_options(needs_root=True) def run(self): + fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE) + if (not fstore.has_files() and + not os.path.exists(paths.IPA_DEFAULT_CONF)): + raise admintool.ScriptError( + "IPA client is not configured on this system.") + api.bootstrap(context='cli_installer') api.finalize() -- cgit