275d65c37e
Thu Dec 11 2003 Phil Knirsch <pknirsch@redhat.com> 5.1-2.1 - Built Fedora Core 1 update. Wed Dec 10 2003 Phil Knirsch <pknirsch@redhat.com> 5.1-3 - Removed snmpcheck again, needs perl(Tk) which we don't ship (#111194). - Fixed getopt definition in include file (#111209). - Included Kaj J. Niemi's patch for broken perl module (#111319). - Included Kaj J. Niemi's patch for broken async getnext perl call (#111479). - Included Kaj J. Niemi's patch for broken hr_storage (#111502). Wed Nov 26 2003 Phil Knirsch <pknirsch@redhat.com> 5.1-2 - Included BuildPrereq on lm_sensors-devel on x86 archs (#110616). - Fixed deprecated initscript options (#110618). Wed Nov 19 2003 Phil Knirsch <pknirsch@redhat.com> 5.1-1 - Updated to latest net-snmp-5.1 upstream version. - Tons of specfile and patch cleanup. - Cleaned up perl stuff (mib2c etc, see #107707). - Added lm_sensors support patch for x86 archs from Kaj J. Niemi (#107618). - Added support for custom mib paths and mibs to snmptrapd initscript (#102762)
91 lines
1.5 KiB
Bash
Executable File
91 lines
1.5 KiB
Bash
Executable File
#!/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
|