From e091dd3279bb217ac49ce53668b16b68766f4cb5 Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Wed, 16 Sep 2009 23:44:33 +0000 Subject: do not show error message on empty files --- cron-sh/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cron-sh/functions.sh') 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 -- cgit v1.2.1