Accepting request 183515 from net-snmp:factory
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/183515 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/net-snmp?expand=0&rev=65
This commit is contained in:
parent
2f8fce6dd6
commit
2637d7fe62
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 10 08:26:14 UTC 2013 - lars@linux-schulserver.de
|
||||||
|
|
||||||
|
- improve snmptrapd init script (avoid to overwrite the logfile
|
||||||
|
on restart)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 20 11:22:24 UTC 2013 - lchiquitto@suse.com
|
Mon May 20 11:22:24 UTC 2013 - lchiquitto@suse.com
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
notifempty
|
notifempty
|
||||||
missingok
|
missingok
|
||||||
create 600 root root
|
create 600 root root
|
||||||
|
su root root
|
||||||
sharedscripts
|
sharedscripts
|
||||||
postrotate
|
postrotate
|
||||||
/etc/init.d/snmpd reload ||:
|
/etc/init.d/snmpd reload ||:
|
||||||
|
@ -20,7 +20,9 @@ SNMPTRAPD_CONF="/etc/snmp/snmptrapd.conf"
|
|||||||
SNMPTRAPD_LOGFILE="/var/log/net-snmpd.log"
|
SNMPTRAPD_LOGFILE="/var/log/net-snmpd.log"
|
||||||
SNMPTRAPD_PID="/var/run/snmptrapd.pid"
|
SNMPTRAPD_PID="/var/run/snmptrapd.pid"
|
||||||
|
|
||||||
test -x $SNMPTRAPD || exit 5
|
test -x $SNMPTRAPD || { echo "$SNMPTRAPD not installed";
|
||||||
|
if [ "$1" = "stop" ]; then exit 0;
|
||||||
|
else exit 5; fi; }
|
||||||
|
|
||||||
# Check for existence of needed config file and read it
|
# Check for existence of needed config file and read it
|
||||||
SNMPD_CONFIG=/etc/sysconfig/net-snmp
|
SNMPD_CONFIG=/etc/sysconfig/net-snmp
|
||||||
@ -74,6 +76,11 @@ case "$1" in
|
|||||||
stop)
|
stop)
|
||||||
echo -n "Shutting down snmptrapd: "
|
echo -n "Shutting down snmptrapd: "
|
||||||
killproc -TERM $SNMPTRAPD
|
killproc -TERM $SNMPTRAPD
|
||||||
|
if [ -f "$SNMPTAPDD_LOGFILE" ]; then
|
||||||
|
DATE=$(date +"%Y%m%d")
|
||||||
|
/bin/mv "$SNMPTAPDD_LOGFILE" "$SNMPTAPDD_LOGFILE-$DATE"
|
||||||
|
test -x /usr/bin/bzip2 && /usr/bin/bzip2 "$SNMPTAPDD_LOGFILE-$DATE"
|
||||||
|
fi
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
try-restart)
|
try-restart)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user