Don't prompt regarding previous DS installations in unattended mode.

449150
This commit is contained in:
Rob Crittenden
2008-05-30 15:31:13 -04:00
parent e935287f6e
commit f87dc9123b

View File

@@ -260,11 +260,13 @@ def read_admin_password():
admin_password = read_password("IPA admin") admin_password = read_password("IPA admin")
return admin_password return admin_password
def check_dirsrv(): def check_dirsrv(unattended):
serverids = ipaserver.dsinstance.check_existing_installation() serverids = ipaserver.dsinstance.check_existing_installation()
if serverids: if serverids:
print "" print ""
print "An existing Directory Server has been detected." 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]: ") yesno = raw_input("Do you wish to remove it and create a new one? [no]: ")
if not yesno or yesno.lower()[0] != "y": if not yesno or yesno.lower()[0] != "y":
print "" print ""
@@ -353,7 +355,7 @@ def main():
print "To accept the default shown in brackets, press the Enter key." print "To accept the default shown in brackets, press the Enter key."
print "" print ""
check_dirsrv() check_dirsrv(options.unattended)
ds_user = "" ds_user = ""
realm_name = "" realm_name = ""