mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 23:58:23 -05:00
host-add should not add a PTR record with --no-reverse
https://fedorahosted.org/freeipa/ticket/866
This commit is contained in:
committed by
Rob Crittenden
parent
884f43f0db
commit
7a75464a30
+10
-7
@@ -356,13 +356,16 @@ class host_add(LDAPCreate):
|
||||
except errors.EmptyModlist:
|
||||
# the entry already exists and matches
|
||||
pass
|
||||
revzone, revname = get_reverse_zone(options['ip_address'])
|
||||
try:
|
||||
addkw = { 'ptrrecord' : keys[-1]+'.' }
|
||||
api.Command['dnsrecord_add'](revzone, revname, **addkw)
|
||||
except errors.EmptyModlist:
|
||||
# the entry already exists and matches
|
||||
pass
|
||||
|
||||
if not options.get('no_reverse', False):
|
||||
revzone, revname = get_reverse_zone(options['ip_address'])
|
||||
try:
|
||||
addkw = { 'ptrrecord' : keys[-1]+'.' }
|
||||
api.Command['dnsrecord_add'](revzone, revname, **addkw)
|
||||
except errors.EmptyModlist:
|
||||
# the entry already exists and matches
|
||||
pass
|
||||
|
||||
del options['ip_address']
|
||||
except Exception, e:
|
||||
exc = e
|
||||
|
||||
Reference in New Issue
Block a user