summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Langille <dvl@FreeBSD.org>2023-02-24 15:32:28 +0000
committerDan Langille <dvl@FreeBSD.org>2023-02-24 15:35:47 +0000
commit7344c09f84ab44ed4cefe39f671b2b0b26449fe0 (patch)
tree113855b00a14815163906341a8257ab30d84bb5c
parentsysutils/rsyslog8: update to 8.2302.0 (diff)
net-mgmt/net-snmp: fix net-snmp-config on jail hosts
re https://github.com/net-snmp/net-snmp/issues/280 This patch allows 'net-snmp-config --create-snmpv3-user' to succeed if run on a jail host and snmpd is also running in one of the jails. Thhis patch limits the check to the host, ingnoring jails. PR: 269791
-rw-r--r--net-mgmt/net-snmp/Makefile2
-rw-r--r--net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in11
2 files changed, 11 insertions, 2 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 408c5a9a2baf..7c8700af94ee 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -1,6 +1,6 @@
PORTNAME= snmp
PORTVERSION= 5.9.1
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
diff --git a/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in b/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
index 10afdc703070..7dbc8315504d 100644
--- a/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
+++ b/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
@@ -1,5 +1,14 @@
---- net-snmp-create-v3-user.in.orig 2022-12-03 13:29:45 UTC
+--- net-snmp-create-v3-user.in.orig 2021-05-25 22:19:35 UTC
+++ net-snmp-create-v3-user.in
+@@ -3,7 +3,7 @@
+ # this shell script is designed to add new SNMPv3 users
+ # to Net-SNMP config file.
+
+-if @PSCMD@ | egrep ' snmpd *$' > /dev/null 2>&1 ; then
++if @PSCMD@ -J 0 | egrep ' snmpd *$' > /dev/null 2>&1 ; then
+ echo "Apparently at least one snmpd demon is already running."
+ echo "You must stop them in order to use this command."
+ exit 1
@@ -135,6 +135,7 @@ if test ! -d "$outfile"; then
fi
echo "$line" >> "$outfile"