Created
July 18, 2015 20:35
-
-
Save tersmitten/2a7bc640a670e2ec5c2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /home/mtersmitten/Desktop/snmpd-squeeze 2015-07-18 22:21:12.037083675 +0200 | |
+++ /home/mtersmitten/Desktop/snmpd-wheezy 2015-07-18 22:19:02.269782914 +0200 | |
@@ -90,8 +90,12 @@ | |
;; | |
status) | |
status=0 | |
- status_of_proc /usr/sbin/snmpd snmpd || status=$? | |
- status_of_proc /usr/sbin/snmptrapd snmptrapd || status=$? | |
+ if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then | |
+ status_of_proc /usr/sbin/snmpd snmpd || status=$? | |
+ fi | |
+ if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then | |
+ status_of_proc /usr/sbin/snmptrapd snmptrapd || status=$? | |
+ fi | |
exit $status | |
;; | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
snmpd: init script using wrong return code on option "status"
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615846