Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4647277
By: jordipujol
when working with a Live OS, ddclient cache files are not saved,
and when restarting the machine, ddclient allways updates the Dns service.
An alternative to cache is the DNS lookup, don't use cache only perform a DNS
lookup.
If the address obtained from the DNS answer is wrong, do the update.
I suggest a new option "--dnslookup" to change this behaviour.
Here is a patch to implement this option,
I want to include the option "dnslookup=yes" in the ddclient.conf file, but
I don't have reached the right coding.
--- /home/jpujol/Documents/ddclient-dnslookup/data-3.7.3-4/usr/sbin/ddclient 200
7-10-20 22:55:15.000000000 +0200
+++ /usr/sbin/ddclient 2007-11-28 10:34:16.093155061 +0100
@@ -332,6 +332,7 @@
'retry' => setv(T_BOOL, 0, 0, 0, 0, undef),
'force' => setv(T_BOOL, 0, 0, 0, 0, undef),
'ssl' => setv(T_BOOL, 0, 0, 0, 0, undef),
+ 'dnslookup' => setv(T_BOOL, 0, 0, 0, 0, undef),
'syslog' => setv(T_BOOL, 0, 0, 1, 0, undef),
'facility' => setv(T_STRING,0, 0, 1, 'daemon', undef),
@@ -531,6 +532,7 @@
[ "retry", "!", "-{no}retry : retry failed updates." ],
[ "force", "!", "-{no}force : force an update even if
the update may be unnecessary" ],
[ "timeout", "=i", "-timeout max : wait at most 'max' seconds
for the host to respond" ],
+ [ "dnslookup", "!", "-{no}dnslookup : dont'use cache, verify
service setup with a dns lookup" ],
[ "syslog", "!", "-{no}syslog : log messages to syslog" ],
[ "facility", "=s", "-facility {type} : log messages to syslog
to facility {type}" ],
@@ -1980,6 +1982,12 @@
info("forcing update of %s.", $host);
$update = 1;
+ } elsif ($opt{'dnslookup'}) {
+ info("lookup for the DNS records of %s.", $host);
+ my $address = inet_ntoa(inet_aton($host));
+ if ($address ne $ip) {
+ $update = 1;
+ }
} elsif (!exists($cache{$host})) {
info("forcing updating %s because no cached entry exists.", $host);
$update = 1;
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=467339
|