aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/functions.sh
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2010-02-22 17:34:22 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2010-02-22 17:34:22 +0000
commit2dd2583959ab5540c3dc592f317c8280f470ba3e (patch)
treef0462c9c5fe5ae92110044b5512a43e689400f7b /cron-sh/functions.sh
parent3304d528bfb03ca0fd345591f7b835cfc3320ad2 (diff)
downloadmsec-2dd2583959ab5540c3dc592f317c8280f470ba3e.tar
msec-2dd2583959ab5540c3dc592f317c8280f470ba3e.tar.gz
msec-2dd2583959ab5540c3dc592f317c8280f470ba3e.tar.bz2
msec-2dd2583959ab5540c3dc592f317c8280f470ba3e.tar.xz
msec-2dd2583959ab5540c3dc592f317c8280f470ba3e.zip
properly detect when the option is disabled
Diffstat (limited to 'cron-sh/functions.sh')
-rw-r--r--cron-sh/functions.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/cron-sh/functions.sh b/cron-sh/functions.sh
index b094210..f5ae7a7 100644
--- a/cron-sh/functions.sh
+++ b/cron-sh/functions.sh
@@ -62,6 +62,10 @@ function check_is_enabled() {
# executed from /etc/cron.daily or any directory containing 'daily'; weekly checks
# will run if run withing a directory containing 'weekly', and so on
check=$1
+ # is the check there at all?
+ if [ -z "$check" ]; then
+ return 1
+ fi
current_check=$(current_check_type)
if [ "$check" = "$current_check" ]; then
return 0