summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install/ipa-server-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-install/ipa-server-install')
-rw-r--r--ipa-server/ipa-install/ipa-server-install6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index de1add06..efee04b5 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -260,11 +260,13 @@ def read_admin_password():
admin_password = read_password("IPA admin")
return admin_password
-def check_dirsrv():
+def check_dirsrv(unattended):
serverids = ipaserver.dsinstance.check_existing_installation()
if serverids:
print ""
print "An existing Directory Server has been detected."
+ if unattended:
+ sys.exit(1)
yesno = raw_input("Do you wish to remove it and create a new one? [no]: ")
if not yesno or yesno.lower()[0] != "y":
print ""
@@ -353,7 +355,7 @@ def main():
print "To accept the default shown in brackets, press the Enter key."
print ""
- check_dirsrv()
+ check_dirsrv(options.unattended)
ds_user = ""
realm_name = ""