dyndns2: Wrap long list of group by attributes
This commit is contained in:
parent
203bf12245
commit
d489cea344
1 changed files with 14 additions and 2 deletions
16
ddclient.in
16
ddclient.in
|
@ -4013,7 +4013,6 @@ EoEXAMPLE
|
|||
######################################################################
|
||||
sub nic_dyndns2_update {
|
||||
debug("\nnic_dyndns2_update -------------------");
|
||||
my @groups = group_hosts_by(\@_, qw(login password server script static custom wildcard mx backupmx wantipv4 wantipv6));
|
||||
my %errors = (
|
||||
'badauth' => 'Bad authorization (username or password)',
|
||||
'badsys' => 'The system parameter given was not valid',
|
||||
|
@ -4027,7 +4026,20 @@ sub nic_dyndns2_update {
|
|||
'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org',
|
||||
'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive',
|
||||
);
|
||||
for my $group (@groups) {
|
||||
my @group_by_attrs = qw(
|
||||
backupmx
|
||||
custom
|
||||
login
|
||||
mx
|
||||
password
|
||||
script
|
||||
server
|
||||
static
|
||||
wantipv4
|
||||
wantipv6
|
||||
wildcard
|
||||
);
|
||||
for my $group (group_hosts_by(\@_, @group_by_attrs)) {
|
||||
my @hosts = @{$group->{hosts}};
|
||||
my %groupcfg = %{$group->{cfg}};
|
||||
my $hosts = join(',', @hosts);
|
||||
|
|
Loading…
Reference in a new issue