aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-09-16 23:44:33 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-09-16 23:44:33 +0000
commite091dd3279bb217ac49ce53668b16b68766f4cb5 (patch)
tree7c13ebe77d704348fd3c14c61a704d6b181cc399
parentc6c2f08552e3cad7c63ea5c05e7af634c707fd8c (diff)
downloadmsec-e091dd3279bb217ac49ce53668b16b68766f4cb5.tar
msec-e091dd3279bb217ac49ce53668b16b68766f4cb5.tar.gz
msec-e091dd3279bb217ac49ce53668b16b68766f4cb5.tar.bz2
msec-e091dd3279bb217ac49ce53668b16b68766f4cb5.tar.xz
msec-e091dd3279bb217ac49ce53668b16b68766f4cb5.zip
do not show error message on empty files
-rw-r--r--cron-sh/functions.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh
index 9555033..4be3f7f 100644
--- a/cron-sh/functions.sh
+++ b/cron-sh/functions.sh
@@ -73,6 +73,11 @@ Filter() {
RULE="$2"
exceptions=/etc/security/msec/exceptions
+ if [ ! -f "$FILE" ]; then
+ # file not found - probably test was not run
+ return
+ fi
+
if [ ! -s "$exceptions" -o "a$RULE" = "a" ]; then
FILTER="cat"
else