summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-08-08 19:04:49 +0200
committermaximilian attems <maks@debian.org>2007-08-08 19:04:49 +0200
commita951e89170510a6877aaa0fd281a30f08106008e (patch)
tree5b480fdcd4b0c23cab294b49532de3584c9e43c6 /scripts/functions
parent89bff5c412013a982f8c06b70cd6a80df5e2846d (diff)
downloadinitramfs-tools-a951e89170510a6877aaa0fd281a30f08106008e.tar.gz
initramfs-tools-a951e89170510a6877aaa0fd281a30f08106008e.zip
scripts/funtions: run_scripts() on verbose mode add error messages
* add the error messages * fix double call to set_initlist * skip empty dirs at start
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions13
1 files changed, 12 insertions, 1 deletions
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