From fdbdb7193427633c6ac8574f5416058b3b70e305 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 11 Apr 2007 00:16:23 +0200 Subject: scripts/functions: fix cicular dep panic due to non-working prereqs check prereqs with the same set of checks for valid boot scripts --- scripts/functions | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 183b9f2..00fcf3d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -108,7 +108,18 @@ reduce_satisfied() deplist="$(render array_${1})" unset tmpdeplist for rs_y in ${deplist}; do - if [ ! -f ${initdir}/${rs_y} ]; then + # only allow variable name chars + case ${rs_y} in + *[!A-Za-z0-9_]*) + continue + ;; + esac + # skip non executable scripts + if [ ! -x ${initdir}/${rs_y} ]; then + continue + fi + # skip directories + if [ -d ${initdir}/${rs_y} ]; then continue fi tmpdeplist="${tmpdeplist} ${rs_y}" -- cgit v1.2.3