option to renumber to existing interface address

This commit is contained in:
Oliver Gorwits
2022-07-26 22:32:58 +01:00
parent b52b24dd9b
commit 5ecb09dcb7
3 changed files with 14 additions and 4 deletions

View File

@@ -370,7 +370,8 @@ sub renumber {
$device->update({
ip => $new_ip,
dns => hostname_from_ip($new_ip),
dns => (hostname_from_ip($new_ip)
|| eval { $schema->resultset('DeviceIp')->find($new_ip,$new_ip)->dns } || undef),
});
return $device;