From 2dd2583959ab5540c3dc592f317c8280f470ba3e Mon Sep 17 00:00:00 2001 From: Eugeni Dodonov Date: Mon, 22 Feb 2010 17:34:22 +0000 Subject: properly detect when the option is disabled --- cron-sh/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cron-sh/functions.sh') 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 -- cgit v1.2.1