mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
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
This commit is contained in:
parent
89bff5c412
commit
a951e89170
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user