dyndns2: Improve readability of status parsing
This commit is contained in:
parent
ad4e3769eb
commit
203bf12245
1 changed files with 3 additions and 3 deletions
|
@ -4081,9 +4081,9 @@ sub nic_dyndns2_update {
|
||||||
failed("updating %s: Could not connect to %s.", $hosts, $groupcfg{'server'});
|
failed("updating %s: Could not connect to %s.", $hosts, $groupcfg{'server'});
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# bug #10: some dyndns providers does not return the IP so
|
# The IP address normally comes after the status, but we ignore it. (Some services do not
|
||||||
# we can't use the returned IP
|
# return the IP so we can't rely on it anyway.)
|
||||||
my ($status, $returnedips) = split / /, lc $line;
|
(my $status = $line) =~ s/ .*$//;
|
||||||
if ($status eq 'nochg') {
|
if ($status eq 'nochg') {
|
||||||
warning("updating %s: %s: %s", $hosts, $status, $errors{$status});
|
warning("updating %s: %s: %s", $hosts, $status, $errors{$status});
|
||||||
$status = 'good';
|
$status = 'good';
|
||||||
|
|
Loading…
Reference in a new issue