tidy up last commit and fix some corner cases

This commit is contained in:
Oliver Gorwits
2015-04-27 08:29:01 +01:00
parent 48074f5a46
commit e32814222a
3 changed files with 28 additions and 20 deletions

View File

@@ -103,7 +103,6 @@ unless ($action) {
use App::Netdisco::Util::SNMP ();
use App::Netdisco::Util::Device
qw/get_device delete_device renumber_device/;
use App::Netdisco::Util::DNS 'hostname_from_ip';
with 'App::Netdisco::Daemon::Worker::Poller::Device';
with 'App::Netdisco::Daemon::Worker::Poller::Arpnip';
@@ -171,8 +170,6 @@ unless ($action) {
}
renumber_device($device, $new_dev->ip);
my $hostname = hostname_from_ip($device->ip);
$device->update({dns => $hostname});
return ('done', sprintf 'Renumbered device %s to %s (%s).',
$device->ip, $new_dev->ip, ($hostname || ''));
}