summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-05-28 11:19:45 -0400
committerRob Crittenden <rcritten@redhat.com>2010-06-01 09:53:10 -0400
commit3f5b4233cbf72b25ea86c4c15528200136d14c7a (patch)
tree4bad765162ee821c302f4a806106313d3828f062
parentaf49945ae4d6cc9ed44f5b9ebfafe8f05b7f8459 (diff)
downloadfreeipa-3f5b4233cbf72b25ea86c4c15528200136d14c7a.tar.gz
freeipa-3f5b4233cbf72b25ea86c4c15528200136d14c7a.tar.xz
freeipa-3f5b4233cbf72b25ea86c4c15528200136d14c7a.zip
Catch the condition where dogtag is already configured (no preop.pin)
This causes the installation to blow up badly otherwise. To remove an existing instance run: # pkiremove -pki_instance_root=/var/lib -pki_instance_name=pki-ca
-rw-r--r--ipaserver/install/cainstance.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
index 11e896ba1..90028b41d 100644
--- a/ipaserver/install/cainstance.py
+++ b/ipaserver/install/cainstance.py
@@ -113,6 +113,9 @@ def get_preop_pin(instance_root, instance_name):
preop_pin=match.group(1)
break
+ if preop_pin is None:
+ raise RuntimeError("Unable to find preop.pin in %s. Is your CA already configured?" % filename)
+
return preop_pin
def import_pkcs12(input_file, input_passwd, cert_database,