uptime is 32b INT

This commit is contained in:
Vincent Riquer 2012-07-02 10:37:04 +02:00
parent 76357998e5
commit a2814c1c6a
2 changed files with 8 additions and 1 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
remote-backup (1.6.2) stable; urgency=low
* SNMP uptime is 32b INT
-- Vincent Riquer <v.riquer@b2f-concept.com> Mon, 02 Jul 2012 10:36:31 +0200
remote-backup (1.6.1) stable; urgency=low remote-backup (1.6.1) stable; urgency=low
* lock handling: typo in /proc path * lock handling: typo in /proc path

View File

@ -396,9 +396,10 @@ done
if [ -n "$SNMPCOMM" -a -n "$SNMPDEST" ] if [ -n "$SNMPCOMM" -a -n "$SNMPDEST" ]
then then
read uptime discard < /proc/uptime read uptime discard < /proc/uptime
uptime=$(( ${uptime//./} % (2**32)))
unset discard unset discard
for dest in ${SNMPDEST[@]} for dest in ${SNMPDEST[@]}
do do
snmptrap -v 2c -c $SNMPCOMM $dest ${uptime/./} 1.3.6.1.4.1.39402.1.1.1 "${snmpTrapContent[@]}" snmptrap -v 2c -c $SNMPCOMM $dest $uptime 1.3.6.1.4.1.39402.1.1.1 "${snmpTrapContent[@]}"
done done
fi fi