summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-04-11 00:16:23 +0200
committermaximilian attems <maks@debian.org>2007-04-11 00:16:23 +0200
commitfdbdb7193427633c6ac8574f5416058b3b70e305 (patch)
treee4944c8522bb7613adbfd7c98289bc86ce77c813
parentf2a9e65d56ffecb19a4615ff6c78c1f9ef0a336d (diff)
downloadinitramfs-tools-fdbdb7193427633c6ac8574f5416058b3b70e305.tar.gz
initramfs-tools-fdbdb7193427633c6ac8574f5416058b3b70e305.zip
scripts/functions: fix cicular dep panic due to non-working prereqs
check prereqs with the same set of checks for valid boot scripts
-rw-r--r--debian/changelog8
-rw-r--r--scripts/functions13
2 files changed, 20 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 6aa6359..0da1fed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+initramfs-tools (0.87) UNRELEASED; urgency=low
+
+ * scripts/functions: reduce_satisfied() needs to ignore the same set as
+ set_initlist() otherwise an script having a prereqs on a non-executable
+ boot script may cause circular panic. (closes: 418509)
+
+ -- maximilian attems <maks@debian.org> Wed, 11 Apr 2007 00:07:18 +0200
+
initramfs-tools (0.86) unstable; urgency=low
* update-initramfs: Bound the mode and version variable. (closes: 403905)
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}"