mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
Add forgotten chunks from commit 4e5a68397a
I accidentally pushed the older patch that didn't contain bits for ipa-replica-install.
This commit is contained in:
parent
6f37d139cb
commit
b519b87ea4
@ -60,12 +60,26 @@ def parse_options():
|
|||||||
help="Directory Manager (existing master) password")
|
help="Directory Manager (existing master) password")
|
||||||
parser.add_option("--setup-dns", dest="setup_dns", action="store_true",
|
parser.add_option("--setup-dns", dest="setup_dns", action="store_true",
|
||||||
default=False, help="configure bind with our zone")
|
default=False, help="configure bind with our zone")
|
||||||
|
parser.add_option("--forwarder", dest="forwarders", action="append",
|
||||||
|
help="Add a DNS forwarder")
|
||||||
|
parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
|
||||||
|
default=False, help="Do not add any DNS forwarders, use root servers instead")
|
||||||
|
|
||||||
options, args = parser.parse_args()
|
options, args = parser.parse_args()
|
||||||
|
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
parser.error("you must provide a file generated by ipa-replica-prepare")
|
parser.error("you must provide a file generated by ipa-replica-prepare")
|
||||||
|
|
||||||
|
if not options.setup_dns:
|
||||||
|
if options.forwarders:
|
||||||
|
parser.error("You cannot specify a --forwarder option without the --setup-dns option")
|
||||||
|
if options.no_forwarders:
|
||||||
|
parser.error("You cannot specify a --no-forwarders option without the --setup-dns option")
|
||||||
|
elif options.forwarders and options.no_forwarders:
|
||||||
|
parser.error("You cannot specify a --forwarder option together with --no-forwarders")
|
||||||
|
elif not options.forwarders and not options.no_forwarders:
|
||||||
|
parser.error("You must specify at least one --forwarder option or --no-forwarders option")
|
||||||
|
|
||||||
return options, args[0]
|
return options, args[0]
|
||||||
|
|
||||||
def get_dirman_password():
|
def get_dirman_password():
|
||||||
@ -189,10 +203,14 @@ def install_http(config):
|
|||||||
print "error copying files: " + str(e)
|
print "error copying files: " + str(e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def install_bind(config):
|
def install_bind(config, options):
|
||||||
|
if options.forwarders:
|
||||||
|
forwarders = options.forwarders
|
||||||
|
else:
|
||||||
|
forwarders = ()
|
||||||
bind = bindinstance.BindInstance(dm_password=config.dirman_password)
|
bind = bindinstance.BindInstance(dm_password=config.dirman_password)
|
||||||
ip_address = resolve_host(config.host_name)
|
ip_address = resolve_host(config.host_name)
|
||||||
bind.setup(config.host_name, ip_address, config.realm_name, config.domain_name)
|
bind.setup(config.host_name, ip_address, config.realm_name, config.domain_name, forwarders)
|
||||||
bind.create_instance()
|
bind.create_instance()
|
||||||
|
|
||||||
def check_dirsrv():
|
def check_dirsrv():
|
||||||
|
@ -37,7 +37,17 @@ Do not configure NTP
|
|||||||
Directory Manager (existing master) password
|
Directory Manager (existing master) password
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-setup\-dns\fR
|
\fB\-\-setup\-dns\fR
|
||||||
Generate a DNS zone if it does not exist already and configure the DNS server
|
Generate a DNS zone if it does not exist already and configure the DNS server.
|
||||||
|
This option requires that you either specify at least one DNS forwarder through
|
||||||
|
the \fB\-\-forwarder\fR option or use the \fB\-\-no\-forwarders\fR option.
|
||||||
|
.TP
|
||||||
|
\fB\-\-forwarder\fR=\fIIP_ADDRESS\fR
|
||||||
|
Add a DNS forwarder to the DNS configuration. You can use this option multiple
|
||||||
|
times to specify more forwarders, but at least one must be provided, unless
|
||||||
|
the \fB\-\-no\-forwarders\fR option is specified.
|
||||||
|
.TP
|
||||||
|
\fB\-\-no\-forwarders\fR
|
||||||
|
Do not add any DNS forwarders. Root DNS servers will be used instead.
|
||||||
.SH "EXIT STATUS"
|
.SH "EXIT STATUS"
|
||||||
0 if the command was successful
|
0 if the command was successful
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user