summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--scripts/functions13
2 files changed, 17 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 87ffed4..05b837b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,11 +10,15 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low
(closes: #426917, #429237, #426446)
* debian/scripts: Add /etc/crypttab to reportbug script. Add /sys/block
list for MODULES=dep to reportbug script.
+ * scripts/functions: Add error message on verbose mode about ignored files
+ in boot/hooks dir. Thanks Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>
+ for the initial patch. Fixes a double set_initlist call too. Ignore empty
+ dirs earlier too. (closes: #433459)
[ David Härdeman ]
* hook-functions: Protect all variable with local, plus coding style fixes.
- -- maximilian attems <maks@debian.org> Wed, 08 Aug 2007 01:22:00 +0200
+ -- maximilian attems <maks@debian.org> Wed, 08 Aug 2007 18:57:20 +0200
initramfs-tools (0.89) unstable; urgency=low
diff --git a/scripts/functions b/scripts/functions
index 2914aea..81174bf 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -88,20 +88,32 @@ set_initlist()
{
unset initlist
for si_x in ${initdir}/*; do
+ # skip empty dirs without warning
+ [ "${si_x}" = "${initdir}/*" ] && return
+
# only allow variable name chars
case ${si_x#${initdir}/} in
*[![:alnum:]_]*)
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: not alphanumeric or '_' file"
continue
;;
esac
+
# skip non executable scripts
if [ ! -x ${si_x} ]; then
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: not executable"
continue
fi
+
# skip directories
if [ -d ${si_x} ]; then
+ [ "${verbose}" = "y" ] \
+ && echo "$si_x ignored: a directory"
continue
fi
+
initlist="${initlist} ${si_x#${initdir}/}"
done
}
@@ -171,7 +183,6 @@ pop_list_item()
reduce_prereqs()
{
unset runlist
- set_initlist
set -- ${initlist}
i=$#
# Loop until there's no more in the queue to loop through