nsupdate: Log success/failure once for all hosts
This commit is contained in:
parent
0c2c97123f
commit
f5c59c2024
1 changed files with 3 additions and 4 deletions
|
@ -5655,13 +5655,12 @@ EoINSTR4
|
|||
my $ipv = ($ip eq ($ipv6 // '')) ? '6' : '4';
|
||||
$config{$_}{"ipv$ipv"} = $ip;
|
||||
$config{$_}{"status-ipv$ipv"} = 'good';
|
||||
success("updating %s: good: IPv%s address set to %s", $_, $ipv, $ip);
|
||||
}
|
||||
}
|
||||
success("$hosts: IPv4 address set to $ipv4") if $ipv4;
|
||||
success("$hosts: IPv6 address set to $ipv6") if $ipv6;
|
||||
} else {
|
||||
for (@hosts) {
|
||||
failed("updating %s", $_);
|
||||
}
|
||||
failed("$hosts: error running command");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue