From e2ca54b3c0b73216f1675b47977789a95fd7e3dc Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 1 Apr 2019 12:59:42 +0100 Subject: [PATCH] #551 better error message for both device_auth and snmp_auth --- lib/App/Netdisco/Util/DeviceAuth.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/App/Netdisco/Util/DeviceAuth.pm b/lib/App/Netdisco/Util/DeviceAuth.pm index 034ab669..92298881 100644 --- a/lib/App/Netdisco/Util/DeviceAuth.pm +++ b/lib/App/Netdisco/Util/DeviceAuth.pm @@ -37,7 +37,8 @@ sub fixup_device_auth { my $da = dclone (setting('device_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; my $config = ((scalar @$da) ? $da : $sa);