Dear Dave:

Thanks, and the full text of the file is as follow:

!/bin/bash
# ucd-snmp init file for snmpd
#
# chkconfig: - 50 50
# description: Simple Network Management Protocol (SNMP) Daemon
#
# processname: /usr/sbin/snmpd
# config: /etc/snmp/snmpd.conf
# config: /usr/share/snmp/snmpd.conf
# pidfile: /var/run/snmpd

# source function library
. /etc/init.d/functions

OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd -a"
RETVAL=0
prog="snmpd"

start() {
       echo -n $"Starting $prog: "
       if [ $UID -ne 0 ]; then
               RETVAL=1
               failure
       else
               daemon /usr/sbin/snmpd $OPTIONS
               RETVAL=$?
               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
       fi;
       echo
       return $RETVAL
}

stop() {
       echo -n $"Stopping $prog: "
       if [ $UID -ne 0 ]; then
               RETVAL=1
               failure
       else
               killproc /usr/sbin/snmpd
               RETVAL=$?
               [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/snmpd
       fi;
       echo
       return $RETVAL
}

reload(){
       echo -n $"Reloading $prog: "
       killproc /usr/sbin/snmpd -HUP
       RETVAL=$?
       echo
       return $RETVAL
}

restart(){
   stop
   start
}

condrestart(){
   [ -e /var/lock/subsys/snmpd ] && restart
   return 0
}

case "$1" in
 start)
   start
   ;;
 stop)
   stop
   ;;
 restart)
   restart
       ;;
 reload)
   reload
       ;;
 condrestart)
   condrestart
   ;;
 status)
       status snmpd
   RETVAL=$?
       ;;
 *)
   echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
   RETVAL=1
esac

exit $RETVAL


I don't really the exact meaning of /usr/sbin/snmpd $OPTIONS;  and another
thing is
if I execute ./configure --enable-shared=no --enable-static=yes,  the
resulting snmpd
execution file has the same problem which can not access some mibs.

Thanks, Dave


Best Regards,
Clement Hsu



2006/12/26, Dave Shield <[EMAIL PROTECTED]>:

On 25/12/06, Clement Hsu <[EMAIL PROTECTED]> wrote:
> The init-snmpd start agent via a command daemon /usr/sbin/snmpd
> however, I don't know how to get the value of $OPTIONS, even I execute
> the command $OPTIONS, or try env.

What's the full text of the file that start this up?
It's not really sensible to keep trying to guess your precise environment.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to