mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add A and PTR records of ourselves during installation
If the DNS zones already exist but don't contain our own records, add them. This patch introduces the ipalib.api into the installers. For now, the code is still little messy. Later patches will abandon the way we create zones now and use ipalib.api exclusively.
This commit is contained in:
@@ -31,7 +31,7 @@ from ipaserver.install import dsinstance, replication, installutils, krbinstance
|
||||
from ipaserver.install import bindinstance, httpinstance, ntpinstance, certs
|
||||
from ipaserver import ipaldap
|
||||
from ipapython import version
|
||||
from ipalib import util
|
||||
from ipalib import api, util
|
||||
|
||||
CACERT="/usr/share/ipa/html/ca.crt"
|
||||
|
||||
@@ -343,6 +343,12 @@ def main():
|
||||
service.restart("krb5kdc")
|
||||
|
||||
if options.setup_dns:
|
||||
# First bootstrap the plug-in framework
|
||||
api.bootstrap(in_server=True)
|
||||
api.finalize()
|
||||
api.Backend.ldap2.connect(bind_dn="cn=Directory Manager",
|
||||
bind_pw=config.dirman_password)
|
||||
|
||||
install_bind(config, options)
|
||||
|
||||
# Call client install script
|
||||
|
||||
@@ -51,7 +51,7 @@ from ipaserver.install.installutils import *
|
||||
|
||||
from ipapython import sysrestore
|
||||
from ipapython.ipautil import *
|
||||
from ipalib import util
|
||||
from ipalib import api, util
|
||||
|
||||
pw_name = None
|
||||
|
||||
@@ -646,6 +646,11 @@ def main():
|
||||
bind = bindinstance.BindInstance(fstore, dm_password)
|
||||
bind.setup(host_name, ip_address, realm_name, domain_name, dns_forwarders)
|
||||
if options.setup_dns:
|
||||
# First bootstrap the plug-in framework
|
||||
api.bootstrap(in_server=True)
|
||||
api.finalize()
|
||||
api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password)
|
||||
|
||||
bind.create_instance()
|
||||
else:
|
||||
bind.create_sample_bind_zone()
|
||||
|
||||
Reference in New Issue
Block a user