diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2021-09-29 11:15:11 +0000 |
---|---|---|
committer | Leonardo Arena <leo@bsod.eu> | 2021-12-30 13:56:24 +0100 |
commit | e244c32c828c9f66c696660c728954e90297d8dd (patch) | |
tree | 3f394d7b408f6b41353a585743b4049eb5563f0a | |
parent | 3631481dddabbd91981d68323dc5e60d531def6b (diff) | |
download | aports-e244c32c828c9f66c696660c728954e90297d8dd.zip |
main/net-snmp: remove legacy backward compatibility and modernize init
- Legacy SNMPD_FLAGS variable was removed 6 years ago
- Don't use /var/run anymore
- Run snmpd in foreground, so user has the option to run it under
supervise-daemon (not used by default)
-rw-r--r-- | main/net-snmp/APKBUILD | 6 | ||||
-rw-r--r-- | main/net-snmp/snmpd.confd | 16 | ||||
-rw-r--r-- | main/net-snmp/snmpd.initd | 10 |
3 files changed, 9 insertions, 23 deletions
diff --git a/main/net-snmp/APKBUILD b/main/net-snmp/APKBUILD index a56b14084a7..5c985cc2593 100644 --- a/main/net-snmp/APKBUILD +++ b/main/net-snmp/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> pkgname=net-snmp pkgver=5.9.1 -pkgrel=5 +pkgrel=6 pkgdesc="Simple Network Management Protocol" url="http://www.net-snmp.org/" arch="all" @@ -143,7 +143,7 @@ sha512sums=" 4ad92f50b14d5e27ba86256cc532a2dd055502f4d5fbb1700434f9f01f881fd09bb1eadb94e727554e1470f036707558314c64a66d0376b54e71ab31d5e4baa3 netsnmp-swinst-crash.patch 87a552bd2e41684bba6e87fbcf6454a85ee912d7a339411fda24cebddf7661f0856729e076a917920a542cf84b687ffd90a091daa15f2c48f0ff64f3a53c0ddb fix-includes.patch a085785c935a2791090eaa265c139674387c2f121c843125956fe14377e737844e0f929e2a652f3471b860b406926c43f5e796fedf5041ce6dde0790f25b15a2 0001-snmpd-always-exit-after-displaying-usage.patch -896ef65a6f420073746470cdbd0de8f356c5b936d35e131754905b3d4323c24dcd3a09e0cc8bd90b12e3402f01e478f927f0e4163cb85cb0cc03db3c2e0491f4 snmpd.initd -fb101aa758d741ed3ea88b11f1cd49cfd04bd03ce62435f3acb17724748131c57f00b71fd45cb7e7871d65a1aab576652cd6e158b6406aa6d0998582b8235ef5 snmpd.confd +1616d471105fc004bd7472d244d4ff9eae936875853bc51381ce2ddbb4bc29825beab6ed01299c76e3230b5725083ae169381f4572d12f015f6c682926b708bc snmpd.initd +ca4921190e8b81e3244465fa66bf6f0a075add159c8ec13a1198ded155df89eb984a48e34972b20f549fbfa9bbff4a24d66bf7cd0b51f5f86a26ad4c2f5cf5cc snmpd.confd 073fd2b83eedd6eda1f7345350268ce7946ef6d67a8f26f7c232e46feb75babf68272ae12071a2f9ea76ede71393b3ae4672d3cd47cfd14ab77e3a6482f2e124 snmptrapd.confd " diff --git a/main/net-snmp/snmpd.confd b/main/net-snmp/snmpd.confd index 849517574e6..9431214f905 100644 --- a/main/net-snmp/snmpd.confd +++ b/main/net-snmp/snmpd.confd @@ -1,14 +1,2 @@ -# Initial (empty) options. -OPTS="" - -# Enable connection logging. -#OPTS="${OPTS} -a" - -# Enable syslog and disable file log. -OPTS="${OPTS} -LSwd -Lf /dev/null" - -# Enable agentx socket as /var/agentx/master -# *NOTE* Before uncommenting this, make sure -# the /var/agentx directory exists. -#OPTS="${OPTS} -x /var/agentx/master" - +# Default options +# OPTS="-LSwd -Lf /dev/null" diff --git a/main/net-snmp/snmpd.initd b/main/net-snmp/snmpd.initd index 5d509cc3d98..a15c41b6cbc 100644 --- a/main/net-snmp/snmpd.initd +++ b/main/net-snmp/snmpd.initd @@ -1,13 +1,11 @@ #!/sbin/openrc-run -# for backward compat -case "$SVCNAME" in -snmpd) : ${OPTS:=$SNMPD_FLAGS} ;; -esac +: ${OPTS:="-LSwd -Lf /dev/null"} -pidfile="/var/run/${SVCNAME}.pid" +pidfile="/run/${SVCNAME}.pid" command="/usr/sbin/${SVCNAME}" -command_args="-p ${pidfile} ${OPTS}" +command_args="-f -p ${pidfile} ${OPTS}" +command_background="yes" required_files="/etc/snmp/${SVCNAME}.conf" extra_started_commands="reload" |