[dak/master] 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 7105fda..001ab11 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.1.4
Reply to: