From: Joerg Jaspert Date: Fri, 25 Dec 2015 21:55:43 +0000 (+0100) Subject: ensure boolean values are true/false only X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=43e3cfd0724d425cdfe6528c76a5677ac95e6177;p=dak.git ensure boolean values are true/false only --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 7105fda7..001ab117 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -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}