fix for #491 (untested) (#492)

* move things to debug logging instead of info

* use message which was discussed

* merge master

* fix for #491. also use doublequotes in sprintf in portcontrol.pm line 59, else $device will not be printed
This commit is contained in:
nick n
2019-01-24 15:12:06 +01:00
committed by Oliver Gorwits
parent 6c617a3d55
commit e6d087ef5f
2 changed files with 8 additions and 8 deletions

View File

@@ -17,9 +17,9 @@ register_worker({ phase => 'check' }, sub {
or return Status->error(sprintf "Unknown port name [%s] on device %s",
$job->port, $job->device);
my $vlan_reconfig_check = vlan_reconfig_check(vars->{'port'});
return Status->error("Cannot alter vlan: $vlan_reconfig_check")
if $vlan_reconfig_check;
my $port_reconfig_check = port_reconfig_check(vars->{'port'});
return Status->error("Cannot alter port: $port_reconfig_check")
if $port_reconfig_check;
return Status->done('PortControl is able to run');
});
@@ -56,7 +56,7 @@ sub _action {
my $rv = $snmp->set_i_up_admin($data, $iid);
if (!defined $rv) {
return Status->error(sprintf 'Failed to set [%s] up_admin to [%s] on $device: %s',
return Status->error(sprintf "Failed to set [%s] up_admin to [%s] on $device: %s",
$pn, $data, ($snmp->error || ''));
}