Cleanup of ddclient source.

This commit is contained in:
Nelson Araujo 2015-01-19 10:00:24 -08:00
parent e5e4c730d9
commit 2682aa5fc9

View file

@ -456,7 +456,10 @@ my %services = (
'updateable' => \&nic_dyndns2_updateable, 'updateable' => \&nic_dyndns2_updateable,
'update' => \&nic_dyndns1_update, 'update' => \&nic_dyndns1_update,
'examples' => \&nic_dyndns1_examples, 'examples' => \&nic_dyndns1_examples,
'variables' => merge( $variables{'dyndns-common-defaults'}, $variables{'service-common-defaults'}, ), 'variables' => merge(
$variables{'dyndns-common-defaults'},
$variables{'service-common-defaults'},
),
}, },
'dyndns2' => { 'dyndns2' => {
'updateable' => \&nic_dyndns2_updateable, 'updateable' => \&nic_dyndns2_updateable,
@ -476,7 +479,9 @@ my %services = (
'update' => \&nic_noip_update, 'update' => \&nic_noip_update,
'examples' => \&nic_noip_examples, 'examples' => \&nic_noip_examples,
'variables' => merge( 'variables' => merge(
{ 'custom' => setv( T_BOOL, 0, 1, 1, 0, undef ), }, $variables{'noip-common-defaults'}, $variables{'noip-service-common-defaults'}, { 'custom' => setv( T_BOOL, 0, 1, 1, 0, undef ), },
$variables{'noip-common-defaults'},
$variables{'noip-service-common-defaults'},
), ),
}, },
'concont' => { 'concont' => {
@ -493,7 +498,10 @@ my %services = (
'updateable' => undef, 'updateable' => undef,
'update' => \&nic_dslreports1_update, 'update' => \&nic_dslreports1_update,
'examples' => \&nic_dslreports1_examples, 'examples' => \&nic_dslreports1_examples,
'variables' => merge( { 'host' => setv( T_NUMBER, 1, 1, 1, 0, undef ) }, $variables{'service-common-defaults'}, ), 'variables' => merge(
{ 'host' => setv( T_NUMBER, 1, 1, 1, 0, undef ) },
$variables{'service-common-defaults'},
),
}, },
'hammernode1' => { 'hammernode1' => {
'updateable' => undef, 'updateable' => undef,
@ -532,8 +540,10 @@ my %services = (
'update' => \&nic_dnspark_update, 'update' => \&nic_dnspark_update,
'examples' => \&nic_dnspark_examples, 'examples' => \&nic_dnspark_examples,
'variables' => merge( 'variables' => merge(
{ 'server' => setv( T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef ) }, { 'min-interval' => setv( T_DELAY, 0, 0, 1, interval('5m'), 0 ), }, { 'server' => setv( T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef ) },
$variables{'dnspark-common-defaults'}, $variables{'service-common-defaults'}, { 'min-interval' => setv( T_DELAY, 0, 0, 1, interval('5m'), 0 ), },
$variables{'dnspark-common-defaults'},
$variables{'service-common-defaults'},
), ),
}, },
'namecheap' => { 'namecheap' => {
@ -580,14 +590,18 @@ my %services = (
'updateable' => undef, 'updateable' => undef,
'update' => \&nic_dtdns_update, 'update' => \&nic_dtdns_update,
'examples' => \&nic_dtdns_examples, 'examples' => \&nic_dtdns_examples,
'variables' => merge( $variables{'dtdns-common-defaults'}, $variables{'service-common-defaults'}, ), 'variables' => merge(
$variables{'dtdns-common-defaults'},
$variables{'service-common-defaults'},
),
}, },
'nsupdate' => { 'nsupdate' => {
'updateable' => undef, 'updateable' => undef,
'update' => \&nic_nsupdate_update, 'update' => \&nic_nsupdate_update,
'examples' => \&nic_nsupdate_examples, 'examples' => \&nic_nsupdate_examples,
'variables' => merge( 'variables' => merge(
{ 'login' => setv( T_LOGIN, 1, 0, 1, '/usr/bin/nsupdate', undef ), }, $variables{'nsupdate-common-defaults'}, { 'login' => setv( T_LOGIN, 1, 0, 1, '/usr/bin/nsupdate', undef ), },
$variables{'nsupdate-common-defaults'},
$variables{'service-common-defaults'}, $variables{'service-common-defaults'},
), ),
}, },
@ -605,8 +619,10 @@ my %services = (
); );
$variables{'merged'} = merge( $variables{'merged'} = merge(
$variables{'global-defaults'}, $variables{'service-common-defaults'}, $variables{'global-defaults'},
$variables{'dyndns-common-defaults'}, map { $services{$_}{'variables'} } keys %services, $variables{'service-common-defaults'},
$variables{'dyndns-common-defaults'},
map { $services{$_}{'variables'} } keys %services,
); );
my @opt = ( my @opt = (