Skip to content

Instantly share code, notes, and snippets.

@tersmitten
Created July 18, 2015 20:35
Show Gist options
  • Save tersmitten/2a7bc640a670e2ec5c2a to your computer and use it in GitHub Desktop.
Save tersmitten/2a7bc640a670e2ec5c2a to your computer and use it in GitHub Desktop.
--- /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
;;
*)
@tersmitten
Copy link
Author

snmpd: init script using wrong return code on option "status"

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment