diff options
author | Andrew Manison <amanison@byrd-vm.localdomain> | 2010-04-04 11:57:02 -0400 |
---|---|---|
committer | Andrew Manison <amanison@byrd-vm.localdomain> | 2010-04-04 11:57:02 -0400 |
commit | 8b35a9ab83a841ab17ead4606f647a3158c274fe (patch) | |
tree | c429f54931eb13ba1be1da3542614d6d63fa671b /main/atop/atop-bb-compat.patch | |
parent | a050ffed38a8a17b4b1e7dcb6237800e7881a137 (diff) | |
parent | 67eb88bc5458c93a481c692baa0968cf567fc3f2 (diff) | |
download | aports-8b35a9ab83a841ab17ead4606f647a3158c274fe.tar.bz2 aports-8b35a9ab83a841ab17ead4606f647a3158c274fe.tar.xz |
Merge remote branch 'alpine/master'
Diffstat (limited to 'main/atop/atop-bb-compat.patch')
-rw-r--r-- | main/atop/atop-bb-compat.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/atop/atop-bb-compat.patch b/main/atop/atop-bb-compat.patch new file mode 100644 index 0000000000..ec46d24266 --- /dev/null +++ b/main/atop/atop-bb-compat.patch @@ -0,0 +1,30 @@ +diff --git a/atop.daily b/atop.daily +index e0d994f..8c0cfc0 100755 +--- a/atop.daily ++++ b/atop.daily +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + CURDAY=`date +%Y%m%d` + LOGPATH=/var/log/atop + BINPATH=/usr/bin +@@ -7,11 +7,15 @@ 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) ++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 |