#551 better error message for both device_auth and snmp_auth

This commit is contained in:
Oliver Gorwits
2019-04-01 12:59:42 +01:00
parent 3e1541071c
commit e2ca54b3c0

View File

@@ -37,7 +37,8 @@ sub fixup_device_auth {
my $da = dclone (setting('device_auth') || []); my $da = dclone (setting('device_auth') || []);
my $sa = dclone (setting('snmp_auth') || []); my $sa = dclone (setting('snmp_auth') || []);
die "error: both snmp_auth and device_auth are defined! use only device_auth.\n" die "error: both snmp_auth and device_auth are defined!\n"
. "move snmp_auth config into device_auth and remove snmp_auth.\n"
if scalar @$da and scalar @$sa; if scalar @$da and scalar @$sa;
my $config = ((scalar @$da) ? $da : $sa); my $config = ((scalar @$da) ? $da : $sa);