]> git.decadent.org.uk Git - dak.git/commitdiff
ensure boolean values are true/false only
authorJoerg Jaspert <joerg@debian.org>
Fri, 25 Dec 2015 21:55:43 +0000 (22:55 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 25 Dec 2015 21:55:43 +0000 (22:55 +0100)
config/debian/cron.dinstall

index 7105fda7e1651d36d098d898eb4f007a6983bb73..001ab117f2f0cc89ffe0dfc70b78de0bacf4eda6 100755 (executable)
@@ -208,6 +208,13 @@ while read FUNC ARGS TIME ERR BACKGROUND; do
         fi
     done
 
+    # ERR/BACKGROUND are boolean, check that they are.
+    for var in ERR BACKGROUND; do
+        if [[ ${!var} != false ]] && [[ ${!var} != true ]]; then
+            error "Illegal value ${!var} for ${var} (should be true or false), line for function ${FUNC}"
+        fi
+    done
+
     case ${FUNC} in
         STATE)
             state ${ARGS}