Fixed a bug in rDNS comfirming

This commit is contained in:
Maff 2014-02-11 14:55:08 +00:00
parent 12bc48e9cf
commit 9867bfc59b
1 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ nicedie "Authoritative zone for IP $ip exists but we can't write to it. Please c
if(!defined $domain and $reset) { if(!defined $domain and $reset) {
set_ptr $ip,$def_rdns or nicedie "Failed to set rDNS for $ip to '$def_rdns'!"; set_ptr $ip,$def_rdns or nicedie "Failed to set rDNS for $ip to '$def_rdns'!";
print "rDNS set"; print "rDNS set";
print ((confirm_rdns $ip, $def_rdns) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify; print ((confirm_rdns $def_rdns, $ip) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify;
print "\n"; print "\n";
} elsif(!defined $domain and $delptr) { } elsif(!defined $domain and $delptr) {
del_ptr $ip or nicedie "Failed to delete PTR record for $ip!"; del_ptr $ip or nicedie "Failed to delete PTR record for $ip!";
@ -243,7 +243,7 @@ if(defined $domain) {
nicedie "Forward DNS for $domain doesn't match $ip!" unless $force or does_fqdn_match $domain, $ip; nicedie "Forward DNS for $domain doesn't match $ip!" unless $force or does_fqdn_match $domain, $ip;
set_ptr $ip,$domain or nicedie "Failed to set rDNS for $ip to '$domain'!"; set_ptr $ip,$domain or nicedie "Failed to set rDNS for $ip to '$domain'!";
print "rDNS set"; print "rDNS set";
print ((confirm_rdns $ip, $def_rdns) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify; print ((confirm_rdns $domain, $ip) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify;
print ".\n"; print ".\n";
} }
do_sync $ip if (($made_modifications and !$nosync) or $fsync); do_sync $ip if (($made_modifications and !$nosync) or $fsync);