From 64d406e2ba144aabe6cfcb205edf27977f3de53d Mon Sep 17 00:00:00 2001 From: Maff Date: Tue, 11 Feb 2014 15:03:05 +0000 Subject: [PATCH] Fixed a bug with confirm_rdns and a bug in return code handling for cpanel syncing --- rdns-manager | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rdns-manager b/rdns-manager index e8b242b..9cc2d72 100755 --- a/rdns-manager +++ b/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;