summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2007-04-05 21:48:20 +0200
committermaximilian attems <maks@debian.org>2007-04-05 21:48:20 +0200
commit60ee14df535436fc3dfc537017ba944f62e559ae (patch)
tree115b2cf486394f0c8f54d70d8597544aaaaeed3b /scripts/functions
parente5bc704cb8be07ecdd419f3630f8ce98129615c0 (diff)
downloadinitramfs-tools-60ee14df535436fc3dfc537017ba944f62e559ae.tar.gz
initramfs-tools-60ee14df535436fc3dfc537017ba944f62e559ae.zip
scripts/functions, mkinitramfs: better backup file handling
* don't panick on backup files on boot, just ignore them * don't include backup file in initramfs * cleanup changelog this is quite a fundamental change need to double check that it works on nfs root too.. :)
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions
index 7ae9c78..d8e0411 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -85,9 +85,20 @@ set_initlist()
{
unset initlist
for si_x in ${initdir}/*; do
+ # only allow variable name chars
+ case ${si_x#${initdir}/} in
+ *[!A-Za-z0-9_]*)
+ continue
+ ;;
+ esac
+ # skip non executable scripts
if [ ! -x ${si_x} ]; then
continue
fi
+ # skip directories
+ if [ -d ${si_x} ]; then
+ continue
+ fi
initlist="${initlist} ${si_x#${initdir}/}"
done
}
@@ -187,6 +198,7 @@ call_scripts()
run_scripts()
{
initdir=${1}
+ [ ! -d ${initdir} ] && return
get_prereqs
reduce_prereqs
call_scripts