From 7344c09f84ab44ed4cefe39f671b2b0b26449fe0 Mon Sep 17 00:00:00 2001 From: Dan Langille Date: Fri, 24 Feb 2023 15:32:28 +0000 Subject: 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 --- net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in') 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" -- cgit v1.2.3