aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cron-sh/functions.sh')
-rw-r--r--cron-sh/functions.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh
index cedd4c1..af08ad4 100644
--- a/cron-sh/functions.sh
+++ b/cron-sh/functions.sh
@@ -69,7 +69,8 @@ Count() {
Filter() {
# filters output according to defined rules
- RULE="$1"
+ FILE="$1"
+ RULE="$2"
exceptions=/etc/security/msec/exceptions
if [ ! -s "$exceptions" -o "a$RULE" = "a" ]; then
@@ -83,7 +84,8 @@ Filter() {
done
FILTER="sed $EXCEPTIONS"
fi
- $FILTER
+ $FILTER < $FILE > ${FILE}.tmp
+ mv -f ${FILE}.tmp $FILE
}