--- snmpd_1004 2013-04-23 12:04:39.360118966 +0200 +++ snmpd_1204 2013-04-23 12:02:56.336877889 +0200 @@ -86,8 +86,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 ;; *)