yellowman / nsh

OpenBSD networking configuration shell
http://www.nmedia.net/nsh/
Other
174 stars 27 forks source link

snmpctl gone since OpenBSD 6.6 #146

Closed ryan-sg closed 2 months ago

ryan-sg commented 2 months ago

snmpctl(8) was retired in OpenBSD 6.6 https://www.openbsd.org/66.html

Imported snmp(1), a new SNMP client which aims to be netsnmp-compatible for supported features, and removed snmpctl(8).

It looks like the only place this was used in nsh, was for the ability to send SNMP traps. For fun I tried this

index 016abaa..20127b4 100644
--- a/ctl.h
+++ b/ctl.h
@@ -58,7 +58,7 @@
 #define IKECTL          "/usr/sbin/ikectl"
 #define DVMRPCTL        "/usr/sbin/dvmrpctl"
 #define RELAYCTL        "/usr/sbin/relayctl"
-#define SNMPCTL         "/usr/sbin/snmpctl"
+#define SNMPCTL         "/usr/bin/snmp"
 #define SMTPCTL         "/usr/sbin/smtpctl"
 #define LDAPCTL         "/usr/sbin/ldapctl"

This seems to work OK

snmp: No securityName specified

Without, it complains that /usr/sbin/snmpctl cannot be found. While this (seems to) work**, it seems almost awkward to leave it this way as its not really a ctl program at all. I'm not smart enough to try and shuffle things around to make 'snmp' a non-configure command.

** I don't use SNMP traps enough to know how to test it properly, I'm sure 'hi' is not enough.

smytht commented 2 months ago

Thanks Ryan for raising, it
we have removed the wrong reference and we have removed the trap command as it needs to be re-worked to use the snmp client binary , the fix is in commit efd37145daca2646b4ed8c8d1c3eb319000c95df Thanks again for raising it It is very much appreciated

smytht commented 2 months ago

efd37145daca2646b4ed8c8d1c3eb319000c95df fixes this issue