diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2024-07-19 18:03:04 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2024-07-19 18:04:28 +0000 |
commit | 9364edfdf092ee1edc0401518e89d0340ef535ca (patch) | |
tree | 4c11420640a402a39aef52ce54396954066a92ec | |
parent | 5e2c397a9bc9b5dc2079b84be9fe6642b853aae0 (diff) | |
download | ports-9364edfdf092ee1edc0401518e89d0340ef535ca.tar.gz ports-9364edfdf092ee1edc0401518e89d0340ef535ca.zip |
net-mgmt/net-snmp: Fix scenario where a user does not have a config in the default location
PR: 280284
Reported by: gebhart@secnetix.de
-rw-r--r-- | net-mgmt/net-snmp/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/snmpd.in | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile index e6b4d2ba83d9..e7558608e1b8 100644 --- a/net-mgmt/net-snmp/Makefile +++ b/net-mgmt/net-snmp/Makefile @@ -1,7 +1,7 @@ PORTNAME= snmp PORTVERSION= 5.9.4 PORTEPOCH= 1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net-mgmt MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \ ZI diff --git a/net-mgmt/net-snmp/files/snmpd.in b/net-mgmt/net-snmp/files/snmpd.in index 575086a381cd..b3e02f1a5586 100644 --- a/net-mgmt/net-snmp/files/snmpd.in +++ b/net-mgmt/net-snmp/files/snmpd.in @@ -77,7 +77,10 @@ net_snmpd_precmd() { done # -c does not override the default config file. - check_conffile %%PREFIX%%/share/snmp/snmpd.conf + # if it exists, sanity check + if [ -f %%PREFIX%%/share/snmp/snmpd.conf ]; then + check_conffile %%PREFIX%%/share/snmp/snmpd.conf + fi for conffile in ${snmpd_conffile}; do check_conffile ${conffile} if [ -f "${conffile}" -a -s "${conffile}" ]; then |