Summary: | net-analyzer/net-snmp-5.7.2-r1 - add systemd support | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joerg Neikes <j.m.neikes> |
Component: | Current packages | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | systemd |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 448882 | ||
Attachments: |
net-snmp-5.7.2-r1.ebuild
snmpd.service net-snmp-5.7.2-r1.ebuild net-snmp-5.7.2-r1.ebuild snmpd.conf net-snmp-5.7.2-r1.ebuild |
Description
Joerg Neikes
2013-11-20 13:28:38 UTC
Created attachment 363644 [details]
snmpd.service
added snmpd.service to net-snmp-5.7.2.
Created attachment 363646 [details]
net-snmp-5.7.2-r1.ebuild
Created attachment 363648 [details]
net-snmp-5.7.2-r1.ebuild
Created attachment 363650 [details]
snmpd.conf
Created attachment 363652 [details]
net-snmp-5.7.2-r1.ebuild
Comment on attachment 363652 [details]
net-snmp-5.7.2-r1.ebuild
--- net-snmp-5.7.2.ebuild 2013-09-20 18:59:48.000000000 +0200
+++ - 2013-11-20 15:23:17.647014694 +0100
@@ -9,7 +9,7 @@
WANT_AUTOMAKE=none
PATCHSET=1
-inherit autotools distutils-r1 eutils perl-module
+inherit autotools distutils-r1 eutils perl-module systemd
MY_P="${P/_rc/.rc}"
@@ -144,4 +144,16 @@
"${D}"/usr/share/snmp/*.conf \
"${D}"/**/*.pl
fi
+ # systemd support
+ systemd_newunit "${FILESDIR}/snmpd.service" "snmpd.service"
}
+
+pkg_postinst() {
+ elog "For using systemd"
+ elog " systemctl enable snmpd.service"
+ elog "and outcommand"
Do what?
+ elog "# SNMPD_FLAGS=\"-p /var/run/snmpd.pid\""
+ elog "in /etc/conf.d/snmpd"
+ echo
+}
+
Comment on attachment 363650 [details]
snmpd.conf
--- files/snmpd.conf 2012-08-03 13:48:10.000000000 +0200
+++ - 2013-11-20 15:25:17.246376909 +0100
@@ -5,6 +5,9 @@
# Initial (empty) options.
SNMPD_FLAGS=""
+# needed for systemd
+# SNMPD_FLAGS="-p /var/run/snmpd.pid"
Didn't we switch from /var/run to /run precisely because of systemd?
+
# Enable connection logging.
#SNMPD_FLAGS="${SNMPD_FLAGS} -a"
Comment on attachment 363644 [details] snmpd.service >[Unit] >Description=Simple Network Management Protokoll Deamon > >[Service] >Type=forking >ExecStart=/usr/sbin/snmpd Any reason not to run it in non-detaching mode as Type=simple? >ExecStop=/bin/kill -TERM $MAINPID Why this? This is precisely what systemd does by default. +*net-snmp-5.7.2-r1 (23 Nov 2013) + + 23 Nov 2013; Pacho Ramos <pacho@gentoo.org> +files/snmpd.service, + +files/snmptrapd.service, +net-snmp-5.7.2-r1.ebuild: + Add unit file (#491768 by Joerg Neikes) + |