mirror of
git://slackware.nl/current.git
synced 2024-12-26 09:58:59 +01:00
2407271ff3
ap/vim-8.2.3868-x86_64-1.txz: Upgraded. kde/breeze-icons-5.89.0-noarch-2.txz: Rebuilt. Applied upstream patches: [PATCH] improve installation of light fallback icons [PATCH] Include "*@*" in the icon_files list for installation Thanks to Heinz Wiesinger. l/gtk+3-3.24.31-x86_64-1.txz: Upgraded. l/zstd-1.5.1-x86_64-1.txz: Upgraded. n/net-snmp-5.9.1-x86_64-4.txz: Rebuilt. Moved options for snmpd from rc.snmpd to /etc/default/snmpd. Thanks to Jakub 'shasta' Jankowski. xap/vim-gvim-8.2.3868-x86_64-1.txz: Upgraded.
55 lines
981 B
Bash
55 lines
981 B
Bash
#!/bin/sh
|
|
#
|
|
# rc.snmpd This shell script takes care of starting and stopping
|
|
# the net-snmp SNMP daemon
|
|
|
|
[ -r /etc/default/snmpd ] && . /etc/default/snmpd
|
|
SNMPD_OPTIONS=${SNMPD_OPTIONS:-"-A -p /var/run/snmpd -a"}
|
|
|
|
start() {
|
|
if [ -x /usr/sbin/snmpd -a -f /etc/snmp/snmpd.conf ]; then
|
|
echo -n "Starting snmpd: "
|
|
/usr/sbin/snmpd $SNMPD_OPTIONS -c /etc/snmp/snmpd.conf
|
|
echo " /usr/sbin/snmpd $SNMPD_OPTIONS -c /etc/snmp/snmpd.conf"
|
|
fi
|
|
}
|
|
|
|
stop() {
|
|
# Stop daemons.
|
|
COUNT=0
|
|
echo -n "Shutting down snmpd: "
|
|
while `killall snmpd 2>/dev/null`; do
|
|
echo -n "."
|
|
sleep 1
|
|
COUNT=$((COUNT+1))
|
|
if [ $COUNT -ge 30 ]; then
|
|
killall -9 snmpd
|
|
sleep 1
|
|
break
|
|
fi
|
|
done
|
|
echo " DONE"
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/run/snmpd ]; then
|
|
stop
|
|
start
|
|
fi
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|condrestart}"
|
|
;;
|
|
esac
|