Fixed a bug with confirm_rdns and a bug in return code handling for cpanel syncing
This commit is contained in:
parent
9867bfc59b
commit
64d406e2ba
10
rdns-manager
10
rdns-manager
|
@ -227,9 +227,7 @@ nicedie "Authoritative zone for IP $ip exists but we can't write to it. Please c
|
|||
|
||||
if(!defined $domain and $reset) {
|
||||
set_ptr $ip,$def_rdns or nicedie "Failed to set rDNS for $ip to '$def_rdns'!";
|
||||
print "rDNS set";
|
||||
print ((confirm_rdns $def_rdns, $ip) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify;
|
||||
print "\n";
|
||||
print "rDNS set.\n";
|
||||
} elsif(!defined $domain and $delptr) {
|
||||
del_ptr $ip or nicedie "Failed to delete PTR record for $ip!";
|
||||
print "PTR record for IP $ip deleted.\n";exit;
|
||||
|
@ -242,8 +240,8 @@ if(!defined $domain and $reset) {
|
|||
if(defined $domain) {
|
||||
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'!";
|
||||
print "rDNS set";
|
||||
print ((confirm_rdns $domain, $ip) ? " and resolving" : " but not yet resolving (check manually with 'host $ip')") if $verify;
|
||||
print ".\n";
|
||||
print "rDNS set.\n";
|
||||
}
|
||||
do_sync $ip if (($made_modifications and !$nosync) or $fsync);
|
||||
my $domain = $def_rdns unless defined $domain;
|
||||
print ((confirm_rdns $ip, $domain) ? "rDNS for IP $ip was successfully set to $domain." : "rDNS for IP $ip not yet resolving to $domain (check later with: host $ip)") if $verify;
|
||||
|
|
Loading…
Reference in New Issue