Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
     5         kx #!/bin/sh
     5         kx #
     5         kx # rc.snmpd   This shell script takes care of starting and stopping
     5         kx #            the net-snmp SNMP daemon
     5         kx 
     5         kx OPTIONS="-A -p /var/run/snmpd -a"
     5         kx 
     5         kx start() {
     5         kx   if [ -x /usr/sbin/snmpd -a -f /etc/snmp/snmpd.conf ]; then
     5         kx     echo -n "Starting snmpd: "
     5         kx     /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf
     5         kx     echo " /usr/sbin/snmpd $OPTIONS -c /etc/snmp/snmpd.conf"
     5         kx   fi
     5         kx }
     5         kx 
     5         kx stop() {
     5         kx   # Stop daemons.
     5         kx   COUNT=0
     5         kx   echo -n "Shutting down snmpd: "
     5         kx   while `killall snmpd 2>/dev/null`; do
     5         kx     echo -n "."
     5         kx     sleep 1
     5         kx     COUNT=$((COUNT+1))
     5         kx     if [ $COUNT -ge 30 ]; then
     5         kx       killall -9 snmpd
     5         kx       sleep 1
     5         kx       break
     5         kx     fi
     5         kx   done
     5         kx   echo " DONE"
     5         kx }
     5         kx 
     5         kx # See how we were called.
     5         kx case "$1" in
     5         kx   start)
     5         kx     start
     5         kx     ;;
     5         kx   stop)
     5         kx     stop
     5         kx     ;;
     5         kx   restart|reload)
     5         kx     stop
     5         kx     start
     5         kx     ;;
     5         kx   condrestart)
     5         kx     if [ -f /var/run/snmpd ]; then
     5         kx       stop
     5         kx       start
     5         kx     fi
     5         kx     ;;
     5         kx   *)
     5         kx     echo $"Usage: $0 {start|stop|restart|condrestart}"
     5         kx     ;;
     5         kx esac