mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Hi,
Here is another patch for the installer. It does a few things: * use socket.getfqdn() but fallback to gethostname() * streamlines the hostname prompting * fixes a bunch of spelling and grammatical errors * fixes a bug in the hostname reading/verification logic * allows "yes" and "no" as answers * modularizes and reuses code where possible * changes some of the prompts to be more like the FDS installer - some text is copied (which is easy to use IMO) * tries to make the prompts fit on smaller screens (<80 chars) Hope you agree that it is better. :) Thanks, Jon
This commit is contained in:
@@ -72,7 +72,7 @@ def parse_options():
|
|||||||
not options.dm_password or
|
not options.dm_password or
|
||||||
not options.admin_password or
|
not options.admin_password or
|
||||||
not options.master_password):
|
not options.master_password):
|
||||||
parser.error("error: In unattended mode you need to provide iat least -u, -r, -p and -P options")
|
parser.error("error: In unattended mode you need to provide at least -u, -r, -p and -P options")
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|
||||||
@@ -123,14 +123,205 @@ def check_existing_installation():
|
|||||||
dirs = glob.glob("/etc/dirsrv/slapd-*")
|
dirs = glob.glob("/etc/dirsrv/slapd-*")
|
||||||
if not dirs:
|
if not dirs:
|
||||||
return
|
return
|
||||||
yesno = raw_input("An existing Directory Server has been detected. Do you wish to remove it and create a new one? [y/N]: ")
|
print ""
|
||||||
if yesno.lower() != "y":
|
print "An existing Directory Server has been detected."
|
||||||
|
yesno = raw_input("Do you wish to remove it and create a new one? [no]: ")
|
||||||
|
if not yesno or yesno.lower()[0] != "y":
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
for d in dirs:
|
for d in dirs:
|
||||||
serverid = os.path.basename(d).split("slapd-", 1)[1]
|
serverid = os.path.basename(d).split("slapd-", 1)[1]
|
||||||
if serverid:
|
if serverid:
|
||||||
erase_ds_instance_data (serverid)
|
erase_ds_instance_data (serverid)
|
||||||
|
|
||||||
|
def get_fqdn():
|
||||||
|
fqdn = ""
|
||||||
|
try:
|
||||||
|
fqdn = socket.getfqdn()
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
fqdn = socket.gethostname()
|
||||||
|
except:
|
||||||
|
fqdn = ""
|
||||||
|
return fqdn
|
||||||
|
|
||||||
|
def verify_fqdn(host_name):
|
||||||
|
is_ok = True
|
||||||
|
if len(host_name.split(".")) < 2 or host_name == "localhost.localdomain":
|
||||||
|
print "Invalid hostname: " + host_name
|
||||||
|
print "This host name can't be used as a hostname for an IPA Server"
|
||||||
|
is_ok = False
|
||||||
|
return is_ok
|
||||||
|
|
||||||
|
def read_host_name(host_default):
|
||||||
|
host_ok = False
|
||||||
|
host_name = ""
|
||||||
|
|
||||||
|
print "Enter the fully qualified domain name of the computer"
|
||||||
|
print "on which you're setting up server software. Using the form"
|
||||||
|
print "<hostname>.<domainname>"
|
||||||
|
print "Example: master.example.com."
|
||||||
|
print ""
|
||||||
|
print ""
|
||||||
|
if host_default == "":
|
||||||
|
host_default = "master.example.com"
|
||||||
|
while not host_ok:
|
||||||
|
host_input = raw_input("Server host name [" + host_default + "]: ")
|
||||||
|
print ""
|
||||||
|
if host_input == "":
|
||||||
|
host_name = host_default
|
||||||
|
else:
|
||||||
|
host_name = host_input
|
||||||
|
if not verify_fqdn(host_name):
|
||||||
|
host_name = ""
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
host_ok = True
|
||||||
|
return host_name
|
||||||
|
|
||||||
|
def resolve_host(host_name):
|
||||||
|
ip = ""
|
||||||
|
try:
|
||||||
|
ip = socket.gethostbyname(host_name)
|
||||||
|
|
||||||
|
if ip == "127.0.0.1" or ip == "::1":
|
||||||
|
print "The hostname resolves to the localhost address (127.0.0.1/::1)"
|
||||||
|
print "Please change your /etc/hosts file so that the hostname"
|
||||||
|
print "resolves to the ip address of your network interface."
|
||||||
|
print "The KDC service does not listen on localhost"
|
||||||
|
print ""
|
||||||
|
print "Please fix your /etc/hosts file and restart the setup program"
|
||||||
|
return "-Fatal Error-"
|
||||||
|
|
||||||
|
except:
|
||||||
|
print "Unable to lookup the IP address of the provided host"
|
||||||
|
return ip
|
||||||
|
|
||||||
|
def verify_ip_address(ip):
|
||||||
|
is_ok = True
|
||||||
|
try:
|
||||||
|
socket.inet_pton(socket.AF_INET, ip)
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
socket.inet_pton(socket.AF_INET6, ip)
|
||||||
|
except:
|
||||||
|
print "Unable to verify IP address"
|
||||||
|
is_ok = False
|
||||||
|
return is_ok
|
||||||
|
|
||||||
|
def read_ip_address():
|
||||||
|
askip = True
|
||||||
|
while askip:
|
||||||
|
ip = raw_input("Please provide the IP address to be used for this host name: ")
|
||||||
|
|
||||||
|
if ip == "":
|
||||||
|
continue
|
||||||
|
if ip == "127.0.0.1" or ip == "::1":
|
||||||
|
print "The IPA Server can't use localhost as a valid IP"
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not verify_ip_address(ip):
|
||||||
|
continue
|
||||||
|
|
||||||
|
print "Adding ["+ip+" "+host_name+"] to your /etc/hosts file"
|
||||||
|
hosts_fd = open('/etc/hosts', 'r+')
|
||||||
|
hosts_fd.seek(0, 2)
|
||||||
|
hosts_fd.write(ip+'\t'+host_name+' '+host_name[:host_name.find('.')]+'\n')
|
||||||
|
hosts_fd.close()
|
||||||
|
askip = False
|
||||||
|
|
||||||
|
def read_ds_user():
|
||||||
|
print "The server must run as a specific user in a specific group."
|
||||||
|
print "It is strongly recommended that this user should have no privileges"
|
||||||
|
print "on the computer (i.e. a non-root user). The setup procedure"
|
||||||
|
print "will give this user/group some permissions in specific paths/files"
|
||||||
|
print "to perform server-specific operations."
|
||||||
|
print ""
|
||||||
|
|
||||||
|
ds_user = ""
|
||||||
|
try:
|
||||||
|
pwd.getpwnam('dirsrv')
|
||||||
|
|
||||||
|
print "A user account named 'dirsrv' already exists."
|
||||||
|
print ""
|
||||||
|
yesno = raw_input("Do you want to use the existing 'dirsrv' account? [yes]: ")
|
||||||
|
print ""
|
||||||
|
if not yesno or yesno.lower()[0] != "n":
|
||||||
|
ds_user = "dirsrv"
|
||||||
|
else:
|
||||||
|
ds_user = raw_input("Which account name do you want to use for the DS instance? ")
|
||||||
|
print ""
|
||||||
|
except KeyError:
|
||||||
|
ds_user = "dirsrv"
|
||||||
|
|
||||||
|
return ds_user
|
||||||
|
|
||||||
|
def read_realm_name(domain_name):
|
||||||
|
print "The kerberos protocol requires a Realm name to be defined."
|
||||||
|
print "This is typically the domain name converted to uppercase."
|
||||||
|
print ""
|
||||||
|
upper_dom = domain_name.upper()
|
||||||
|
realm_name = raw_input("Please provide a realm name ["+upper_dom+"]: ")
|
||||||
|
print ""
|
||||||
|
if realm_name == "":
|
||||||
|
realm_name = upper_dom
|
||||||
|
else:
|
||||||
|
upper_dom = realm_name.upper()
|
||||||
|
if upper_dom != realm_name:
|
||||||
|
print "It is strongly recommended that you use a completely uppercased name for the realm."
|
||||||
|
dom_realm = raw_input("Do you want to use "+upper_dom+" as realm name ? [yes]: ")
|
||||||
|
print ""
|
||||||
|
if dom_realm and dom_realm.lower()[0] != "y":
|
||||||
|
print "WARNING: Using a non upper-cased realm name may cause unexpected problems."
|
||||||
|
else:
|
||||||
|
realm_name = upper_dom
|
||||||
|
return realm_name
|
||||||
|
|
||||||
|
def read_password(user):
|
||||||
|
correct = False
|
||||||
|
pwd = ""
|
||||||
|
while not correct:
|
||||||
|
pwd = getpass.getpass(user + " password: ")
|
||||||
|
if not pwd:
|
||||||
|
continue
|
||||||
|
pwd_confirm = getpass.getpass("Password (confirm): ")
|
||||||
|
if pwd != pwd_confirm:
|
||||||
|
print "Password mismatch!"
|
||||||
|
print ""
|
||||||
|
else:
|
||||||
|
correct = True
|
||||||
|
#TODO: check validity/length
|
||||||
|
print ""
|
||||||
|
return pwd
|
||||||
|
|
||||||
|
def read_dm_password():
|
||||||
|
print "Certain directory server operations require an administrative user."
|
||||||
|
print "This user is referred to as the Directory Manager and has full access"
|
||||||
|
print "to the Directory for system management tasks."
|
||||||
|
print "The password must be at least 8 characters long, and contain no spaces."
|
||||||
|
print ""
|
||||||
|
#TODO: provide the option of generating a random password
|
||||||
|
dm_password = read_password("Directory Manager")
|
||||||
|
return dm_password
|
||||||
|
|
||||||
|
def read_master_password():
|
||||||
|
print "The Kerberos database is usually encrypted using a master password."
|
||||||
|
print "Please store this password offline in a secure place."
|
||||||
|
print "It may be necessary in a recovery situation or to install a replica."
|
||||||
|
print "Without the master password the encrypted material can't be used by the KDC."
|
||||||
|
print "If the master password is lost all kerberos related secrets will also be lost."
|
||||||
|
print ""
|
||||||
|
#TODO: provide the option of generating a random password
|
||||||
|
master_password = read_password("Kerberos master")
|
||||||
|
return master_password
|
||||||
|
|
||||||
|
def read_admin_password():
|
||||||
|
print "The IPA server requires an administrative user, named 'admin'."
|
||||||
|
print "This user is a regular system account used for IPA server administration."
|
||||||
|
print ""
|
||||||
|
#TODO: provide the option of generating a random password
|
||||||
|
admin_password = read_password("IPA admin")
|
||||||
|
return admin_password
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global ds
|
global ds
|
||||||
ds = None
|
ds = None
|
||||||
@@ -142,6 +333,12 @@ def main():
|
|||||||
signal.signal(signal.SIGTERM, signal_handler)
|
signal.signal(signal.SIGTERM, signal_handler)
|
||||||
signal.signal(signal.SIGINT, signal_handler)
|
signal.signal(signal.SIGINT, signal_handler)
|
||||||
|
|
||||||
|
print "=============================================================================="
|
||||||
|
print "This program will setup the FreeIPA Server."
|
||||||
|
print ""
|
||||||
|
print "To accept the default shown in brackets, press the Enter key."
|
||||||
|
print ""
|
||||||
|
|
||||||
check_existing_installation()
|
check_existing_installation()
|
||||||
|
|
||||||
options = parse_options()
|
options = parse_options()
|
||||||
@@ -168,234 +365,84 @@ def main():
|
|||||||
# utilities just use the hostname as returned by gethostbyname to set
|
# utilities just use the hostname as returned by gethostbyname to set
|
||||||
# up some of the standard entries
|
# up some of the standard entries
|
||||||
|
|
||||||
host_name = ""
|
host_default = ""
|
||||||
if options.host_name:
|
if options.host_name:
|
||||||
host_name = options.host_name
|
host_default = options.host_name
|
||||||
else:
|
else:
|
||||||
try:
|
host_default = get_fqdn()
|
||||||
host_name = socket.gethostname()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
if options.unattended:
|
if options.unattended:
|
||||||
if len(host_name.split(".")) < 2 or host_name == "localhost.localdomain":
|
if not verify_fqdn(host_default):
|
||||||
print "Invalid hostname: "+host_name
|
|
||||||
print "This host name can't be used as a hostname for an IPA Server"
|
|
||||||
return "-Fatal Error-"
|
return "-Fatal Error-"
|
||||||
else:
|
else:
|
||||||
host_ok = False
|
host_name = host_default
|
||||||
while not host_ok:
|
|
||||||
if host_name == "":
|
|
||||||
print ""
|
|
||||||
host_name = raw_input("Please provide a Fully Qualified name to use for your system [master.example.com]: ")
|
|
||||||
if host_name == "":
|
|
||||||
host_name = "master.example.com"
|
|
||||||
|
|
||||||
if len(host_name.split(".")) < 2 or host_name == "localhost.localdomain":
|
|
||||||
print "Invalid hostname: "+host_name
|
|
||||||
print "This host name can't be used as a hostname for an IPA Server"
|
|
||||||
host_name = ""
|
|
||||||
continue
|
|
||||||
else:
|
else:
|
||||||
host_ok = True
|
host_name = read_host_name(host_default)
|
||||||
|
|
||||||
yesno = raw_input("Please confirm this ["+host_name+"] is the server hostname you want to use [Y/n]: ")
|
|
||||||
if yesno != "" and yesno.lower() != 'y':
|
|
||||||
host_name = ""
|
|
||||||
host_ok = False
|
|
||||||
|
|
||||||
domain_name = host_name[host_name.find(".")+1:]
|
domain_name = host_name[host_name.find(".")+1:]
|
||||||
|
|
||||||
# Check we have a public IP that is associated with the hostname
|
# Check we have a public IP that is associated with the hostname
|
||||||
ip = ""
|
ip = resolve_host(host_name)
|
||||||
askip = False
|
if not ip:
|
||||||
try:
|
|
||||||
ip = socket.gethostbyname(host_name)
|
|
||||||
|
|
||||||
if ip == "127.0.0.1" or ip == "::1":
|
|
||||||
print "The hostname resolves to the localhost address (127.0.0.1/::1)"
|
|
||||||
print "Please change your /etc/hosts file so that the hostname"
|
|
||||||
print "resolves to the ip address of your network interface."
|
|
||||||
print "The KDC service does not listen on localhost"
|
|
||||||
print ""
|
|
||||||
print "Please fix your /etc/hosts file and restart the setup program"
|
|
||||||
return "-Fatal Error-"
|
|
||||||
|
|
||||||
except:
|
|
||||||
print "The provided hostname can't actually be use to resolve the IP address"
|
|
||||||
if options.ip_address:
|
if options.ip_address:
|
||||||
ip = options.ip_address
|
ip = options.ip_address
|
||||||
else:
|
if not ip and options.unattended:
|
||||||
askip = True
|
print "Unable to resolve IP address for host name"
|
||||||
|
return "-Fatal Error-"
|
||||||
|
|
||||||
if ip != "":
|
if not verify_ip_address(ip):
|
||||||
try:
|
ip = ""
|
||||||
socket.inet_pton(socket.AF_INET, ip)
|
|
||||||
except:
|
|
||||||
try:
|
|
||||||
socket.inet_pton(socket.AF_INET6, ip)
|
|
||||||
except:
|
|
||||||
print "Invalid IP format"
|
|
||||||
if options.unattended:
|
if options.unattended:
|
||||||
return "-Fatal Error-"
|
return "-Fatal Error-"
|
||||||
else:
|
|
||||||
ip = ""
|
|
||||||
askip = True
|
|
||||||
|
|
||||||
if options.ip_address and options.ip_address != ip:
|
if options.ip_address and options.ip_address != ip:
|
||||||
if options.setup_bind:
|
if options.setup_bind:
|
||||||
ip = options.ip_address
|
ip = options.ip_address
|
||||||
else:
|
else:
|
||||||
print "Error: the hostname resolves to an IP that is different from the one provided on the command line"
|
print "Error: the hostname resolves to an IP address that is different"
|
||||||
print "Please fix your DNS or /etc/hosts file to provide consistent information and restart the setup program"
|
print "from the one provided on the command line. Please fix your DNS"
|
||||||
|
print "or /etc/hosts file and restart the installation."
|
||||||
return "-Fatal Error-"
|
return "-Fatal Error-"
|
||||||
|
|
||||||
if options.unattended:
|
if options.unattended:
|
||||||
if askip or ip == "":
|
if not ip:
|
||||||
print "Unable to resolve IP address"
|
print "Unable to resolve IP address"
|
||||||
return "-Fatal Error-"
|
return "-Fatal Error-"
|
||||||
|
|
||||||
while askip:
|
if not ip:
|
||||||
ip = raw_input("Please provide the IP address to be used for this host name: ")
|
ip = read_ip_address ()
|
||||||
|
|
||||||
if ip == "":
|
|
||||||
print "An empty IP is not acceptable"
|
|
||||||
continue
|
|
||||||
if ip == "127.0.0.1" or ip == "::1":
|
|
||||||
print "The IPA Server can't use localhost as a valid IP"
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
|
||||||
socket.inet_pton(socket.AF_INET, ip)
|
|
||||||
except:
|
|
||||||
try:
|
|
||||||
socket.inet_pton(socket.AF_INET6, ip)
|
|
||||||
except:
|
|
||||||
print "Invalid IP format"
|
|
||||||
continue
|
|
||||||
|
|
||||||
print "Adding ["+ip+" "+host_name+"] to your /etc/hosts file"
|
|
||||||
hosts_fd = open('/etc/hosts', 'r+')
|
|
||||||
hosts_fd.seek(0, 2)
|
|
||||||
hosts_fd.write(ip+'\t'+host_name+' '+host_name[:host_name.find('.')]+'\n')
|
|
||||||
hosts_fd.close()
|
|
||||||
askip = False
|
|
||||||
|
|
||||||
ip_address = ip
|
ip_address = ip
|
||||||
|
|
||||||
print "The IPA Master Server Name will be: " + host_name + ". With IP address: " + ip_address
|
print "The IPA Master Server will be configured with"
|
||||||
print "The IPA Domain Name will be: " + domain_name
|
print "Hostname: " + host_name
|
||||||
|
print "IP address: " + ip_address
|
||||||
|
print "Domain name: " + domain_name
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
if not options.ds_user:
|
if not options.ds_user:
|
||||||
|
ds_user = read_ds_user()
|
||||||
try:
|
|
||||||
pwd.getpwnam('dirsrv')
|
|
||||||
|
|
||||||
print "To securely run Directory Server we need a user account to be set up."
|
|
||||||
print "This will allow DS to run as a user and not as root."
|
|
||||||
print "The user account will have access to some security material so it should not be shared with any other application."
|
|
||||||
print "A user account named 'dirsrv' already exist. You should not share the account with any other service."
|
|
||||||
print ""
|
|
||||||
yesno = raw_input("Do you want to use the existing 'dirsrv' account ? (y/N)")
|
|
||||||
print ""
|
|
||||||
if yesno.lower() == "y":
|
|
||||||
ds_user = "dirsrv"
|
|
||||||
else:
|
|
||||||
ds_user = raw_input("Which account name do you want to use for the DS instance ? ")
|
|
||||||
print ""
|
|
||||||
except KeyError:
|
|
||||||
ds_user = "dirsrv"
|
|
||||||
|
|
||||||
if ds_user == "":
|
if ds_user == "":
|
||||||
return "-Aborted-"
|
return "-Aborted-"
|
||||||
else:
|
else:
|
||||||
ds_user = options.ds_user
|
ds_user = options.ds_user
|
||||||
|
|
||||||
if not options.realm_name:
|
if not options.realm_name:
|
||||||
print "The kerberos protocol requires a Realm name to be defined."
|
realm_name = read_realm_name(domain_name)
|
||||||
print "Usually the domain name all in uppercase is used as realm name."
|
|
||||||
print ""
|
|
||||||
upper_dom = domain_name.upper()
|
|
||||||
realm_name = raw_input("Please provide a realm name ["+upper_dom+"]: ")
|
|
||||||
print ""
|
|
||||||
if realm_name == "":
|
|
||||||
realm_name = upper_dom
|
|
||||||
else:
|
|
||||||
upper_dom = realm_name.upper()
|
|
||||||
if upper_dom != realm_name:
|
|
||||||
print "It is strongly adviced to use a completely uppercased name for the realm."
|
|
||||||
dom_realm = raw_input("Do you want to use "+upper_dom+" as realm name ? [Y/n] ")
|
|
||||||
print ""
|
|
||||||
if dom_realm.lower() != "y":
|
|
||||||
print "WARNING: Using a non upper-cased realm name may cause unexpected problems."
|
|
||||||
else:
|
|
||||||
realm_name = upper_dom
|
|
||||||
else:
|
else:
|
||||||
realm_name = options.realm_name
|
realm_name = options.realm_name
|
||||||
|
|
||||||
if not options.dm_password:
|
if not options.dm_password:
|
||||||
print "The Directory Manager user is the equivalent of 'root' for Diretcory Server."
|
dm_password = read_dm_password()
|
||||||
print "This account has full access to the Directory and is used for system management tasks."
|
|
||||||
print ""
|
|
||||||
#TODO: provide the option of generating a random password
|
|
||||||
correct = False
|
|
||||||
while not correct:
|
|
||||||
dm_password = getpass.getpass("Please provide a password for the Directory Manager: ")
|
|
||||||
pwd_confirm = getpass.getpass("Please confirm the password: ")
|
|
||||||
if dm_password == "":
|
|
||||||
print "Password is empty!"
|
|
||||||
print ""
|
|
||||||
elif dm_password != pwd_confirm:
|
|
||||||
print "Password mismatch!"
|
|
||||||
print ""
|
|
||||||
else:
|
|
||||||
correct = True
|
|
||||||
print ""
|
|
||||||
else:
|
else:
|
||||||
dm_password = options.dm_password
|
dm_password = options.dm_password
|
||||||
|
|
||||||
if not options.master_password:
|
if not options.master_password:
|
||||||
print "The Kerberos database is usually encrypted using a master password."
|
master_password = read_master_password()
|
||||||
print "Please store this password offline in a secure place."
|
|
||||||
print "It may be necessary in a recovery situation or to install a replica."
|
|
||||||
print "Without the master password the encrypted material can't be used by the KDC."
|
|
||||||
print "If the master password gets lost all kerberos related secrets will be lost."
|
|
||||||
print ""
|
|
||||||
#TODO: provide the option of generating a random password
|
|
||||||
correct = False
|
|
||||||
while not correct:
|
|
||||||
master_password = getpass.getpass("Please provide a master password: ")
|
|
||||||
pwd_confirm = getpass.getpass("Please confirm the password: ")
|
|
||||||
if master_password == "":
|
|
||||||
print "Password is empty!"
|
|
||||||
print ""
|
|
||||||
elif master_password != pwd_confirm:
|
|
||||||
print "Password mismatch!"
|
|
||||||
print ""
|
|
||||||
else:
|
|
||||||
correct = True
|
|
||||||
print ""
|
|
||||||
else:
|
else:
|
||||||
master_password = options.master_password
|
master_password = options.master_password
|
||||||
|
|
||||||
if not options.admin_password:
|
if not options.admin_password:
|
||||||
print "The 'admin' user is the administrative user used to administare an IPA server."
|
admin_password = read_admin_password()
|
||||||
print "This account is the one that will be used for normal administration and is also a regular unix user"
|
|
||||||
print ""
|
|
||||||
#TODO: provide the option of generating a random password
|
|
||||||
correct = False
|
|
||||||
while not correct:
|
|
||||||
admin_password = getpass.getpass("Please provide a kerberos password for the 'admin' user: ")
|
|
||||||
pwd_confirm = getpass.getpass("Please confirm the password: ")
|
|
||||||
if admin_password == "":
|
|
||||||
print "Password is empty!"
|
|
||||||
print ""
|
|
||||||
elif admin_password != pwd_confirm:
|
|
||||||
print "Password mismatch!"
|
|
||||||
print ""
|
|
||||||
else:
|
|
||||||
correct = True
|
|
||||||
print ""
|
|
||||||
else:
|
else:
|
||||||
admin_password = options.admin_password
|
admin_password = options.admin_password
|
||||||
|
|
||||||
@@ -419,8 +466,8 @@ def main():
|
|||||||
print "This program is about to replace the DNS Server configuration,"
|
print "This program is about to replace the DNS Server configuration,"
|
||||||
print "with an automatically generated one, based on the data gathered so far."
|
print "with an automatically generated one, based on the data gathered so far."
|
||||||
print "This will REPLACE any existing configuration."
|
print "This will REPLACE any existing configuration."
|
||||||
yesno = raw_input("Are you sure you want to configure the DNS Server ? [y/N]: ")
|
yesno = raw_input("Are you sure you want to configure the DNS Server ? [no]: ")
|
||||||
if yesno.lower() != 'y':
|
if not yesno or yesno.lower()[0] != 'y':
|
||||||
skipbind = True
|
skipbind = True
|
||||||
if not skipbind:
|
if not skipbind:
|
||||||
bind.create_instance()
|
bind.create_instance()
|
||||||
|
|||||||
Reference in New Issue
Block a user