From 9de1d2487365836ff7c0b9a854e4fae3b307567a Mon Sep 17 00:00:00 2001 From: Wim Vinckier Date: Tue, 14 May 2013 21:14:58 +0200 Subject: [PATCH] r152 : Adding sha1-patch provided by pirast in [9742ac09] r150 : Adding support for ChangeIP based on the patch from Michele Giorato http://sourceforge.net/p/ddclient/discussion/399428/thread/e85661ad/ r148 : Updated README file --- README.md | 3 +- ddclient | 99 +++++++++++++++++++++++++++++++++++++--- sample-etc_ddclient.conf | 12 ++++- 3 files changed, 106 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aa4620d..d92196f 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Dynamic DNS services currently supported include: Loopia - See http://www.loopia.se for details Noip - See http://www.noip.com/ for details Freedns - See http://freedns.afraid.org/ for details + ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details DDclient now supports many of cable/dsl broadband routers. @@ -169,4 +170,4 @@ Alternatively, you may just configure ddclient to operate as a daemon and monitor your ethernet interface. ------------------------------------------------------------------------------- -$Id: README.md 148 2013-04-28 14:28:00Z wimpunk $ +$Id: README.md 150 2013-04-28 14:55:34Z wimpunk $ diff --git a/ddclient b/ddclient index 4d0c3f5..6d173ca 100755 --- a/ddclient +++ b/ddclient @@ -1,7 +1,7 @@ #!/usr/bin/perl -w #!/usr/local/bin/perl -w ###################################################################### -# $Id: ddclient 127 2011-07-11 20:21:28Z wimpunk $ +# $Id: ddclient 152 2013-05-14 19:10:05Z wimpunk $ # # DDCLIENT - a Perl client for updating DynDNS information # @@ -20,7 +20,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my ($VERSION) = q$Revision: 127 $ =~ /(\d+)/; +my ($VERSION) = q$Revision: 152 $ =~ /(\d+)/; my $version = "3.8.0-r". $VERSION; my $programd = $0; @@ -554,6 +554,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'changeip' => { + 'updateable' => undef, + 'update' => \&nic_changeip_update, + 'examples' => \&nic_changeip_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'nic.changeip.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, 'dtdns' => { 'updateable' => undef, 'update' => \&nic_dtdns_update, @@ -1779,13 +1789,18 @@ EOM ###################################################################### sub load_sha1_support { my $sha1_loaded = eval {require Digest::SHA1}; - unless ($sha1_loaded) { + my $sha_loaded = eval {require Digest::SHA}; + unless ($sha1_loaded || $sha_loaded) { fatal(<<"EOM"); -Error loading the Perl module Digest::SHA1 needed for freedns update. -On Debian, the package libdigest-sha1-perl must be installed. +Error loading the Perl module Digest::SHA1 or Digest::SHA needed for freedns update. +On Debian, the package libdigest-sha1-perl or libdigest-sha-perl must be installed. EOM } - import Digest::SHA1 (qw/sha1_hex/); + if($sha1_loaded) { + import Digest::SHA1 (qw/sha1_hex/); + } elsif($sha_loaded) { + import Digest::SHA (qw/sha1_hex/); + } } ###################################################################### ## geturl @@ -3588,7 +3603,79 @@ sub nic_freedns_update { } } +###################################################################### +## nic_changeip_examples +###################################################################### +sub nic_changeip_examples { +return <