From 43e3cfd0724d425cdfe6528c76a5677ac95e6177 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 25 Dec 2015 22:55:43 +0100 Subject: [PATCH] ensure boolean values are true/false only --- config/debian/cron.dinstall | 7 +++++++ 1 file changed, 7 insertions(+) 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} -- 2.39.5