#925 implement ignore_deviceports and hide_deviceports
This commit is contained in:
@@ -204,6 +204,30 @@ if (ref {} eq ref setting('macsuck_no_deviceport')) {
|
||||
}
|
||||
else { config->{'macsuck_no_deviceport'} ||= [] }
|
||||
|
||||
if (ref {} eq ref setting('hide_deviceports')) {
|
||||
config->{'hide_deviceports'} = [ setting('hide_deviceports') ];
|
||||
}
|
||||
else { config->{'hide_deviceports'} ||= [] }
|
||||
|
||||
if (ref {} eq ref setting('ignore_deviceports')) {
|
||||
config->{'ignore_deviceports'} = [ setting('ignore_deviceports') ];
|
||||
}
|
||||
else { config->{'ignore_deviceports'} ||= [] }
|
||||
|
||||
# copy old ignore_* into new settings
|
||||
if (scalar @{ config->{'ignore_interfaces'} }) {
|
||||
config->{'host_groups'}->{'__IGNORE_INTERFACES__'}
|
||||
= config->{'ignore_interfaces'};
|
||||
}
|
||||
if (scalar @{ config->{'ignore_interface_types'} }) {
|
||||
config->{'host_groups'}->{'__IGNORE_INTERFACE_TYPES__'}
|
||||
= config->{'ignore_interface_types'};
|
||||
}
|
||||
if (scalar @{ config->{'ignore_notpresent_types'} }) {
|
||||
config->{'host_groups'}->{'__NOTPRESENT_TYPES__'}
|
||||
= config->{'ignore_notpresent_types'};
|
||||
}
|
||||
|
||||
# copy devices_no and devices_only into others
|
||||
foreach my $name (qw/devices_no devices_only
|
||||
discover_no macsuck_no arpnip_no nbtstat_no
|
||||
|
||||
Reference in New Issue
Block a user