diff options
author | maximilian attems <maks@debian.org> | 2007-04-05 21:48:20 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2007-04-05 21:48:20 +0200 |
commit | 60ee14df535436fc3dfc537017ba944f62e559ae (patch) | |
tree | 115b2cf486394f0c8f54d70d8597544aaaaeed3b /scripts/functions | |
parent | e5bc704cb8be07ecdd419f3630f8ce98129615c0 (diff) | |
download | initramfs-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/functions | 12 |
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 |