diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-02-22 15:40:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-02-22 15:40:28 +0000 |
commit | 84c2a825d7c4dfbebf69c836b06d9fdf2c7b9115 (patch) | |
tree | 876b48005f9f487398679ec43876e26fa7327085 /main/atop | |
parent | 08e137c667dbccdb6d6acb8dcd170c0f2d06240c (diff) | |
download | aports-84c2a825d7c4dfbebf69c836b06d9fdf2c7b9115.tar.bz2 aports-84c2a825d7c4dfbebf69c836b06d9fdf2c7b9115.tar.xz |
main/atop: update the patch
Diffstat (limited to 'main/atop')
-rw-r--r-- | main/atop/atop-bb-compat.patch | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/main/atop/atop-bb-compat.patch b/main/atop/atop-bb-compat.patch index ec46d24266..66e45234ae 100644 --- a/main/atop/atop-bb-compat.patch +++ b/main/atop/atop-bb-compat.patch @@ -1,5 +1,5 @@ diff --git a/atop.daily b/atop.daily -index e0d994f..8c0cfc0 100755 +index c72214c..ac4b3b7 100755 --- a/atop.daily +++ b/atop.daily @@ -1,4 +1,4 @@ @@ -8,23 +8,28 @@ index e0d994f..8c0cfc0 100755 CURDAY=`date +%Y%m%d` LOGPATH=/var/log/atop BINPATH=/usr/bin -@@ -7,11 +7,15 @@ INTERVAL=600 # interval 10 minutes +@@ -7,15 +7,20 @@ INTERVAL=600 # interval 10 minutes # verify if atop still runs for daily logging # -if [ -e $PIDFILE ] && ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null --then -- kill -USR1 `cat $PIDFILE` # take final sample +pid= +if [ -e $PIDFILE ]; then -+ pid=$(cat $PIDFILE) ++ pid=$(cat $PIDFILE) +fi + -+if [ -n "$pid" ] && [ -d /proc/$pid ]; then -+ kill -USR1 $pid # take final sample - sleep 3 -- kill -TERM `cat $PIDFILE` -+ kill -TERM $pid - rm $PIDFILE - sleep 1 - fi ++if [ -n "$pid" ] && [ -d /proc/$pid ] + then +- kill -USR2 `cat $PIDFILE` # final sample and terminate ++ kill -USR2 $pid # final sample and terminate + + CNT=0 + +- while ps -p `cat $PIDFILE` > /dev/null ++ while [ -d /proc/$pid ] + do +- let CNT+=1 ++ CNT=$(($CNT + 1)) + + if [ $CNT -gt 5 ] + then |