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 /mkinitramfs | |
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 'mkinitramfs')
-rwxr-xr-x | mkinitramfs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mkinitramfs b/mkinitramfs index 0c278d5..c348516 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -199,13 +199,21 @@ ln -s /lib/klibc-*.so ${DESTDIR}/lib rm -f ${DESTDIR}/bin/kinit ${DESTDIR}/bin/gzip copy_exec /usr/share/initramfs-tools/init /init -cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" -for f in $(cd ${CONFDIR}/scripts && \ - find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ - -o -type f -print); do - mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" -cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" + +# add existant boot scripts +for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ + -regex '.*/[a-z0-9_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "/usr/share/initramfs-tools/scripts/${b}" \ + "${DESTDIR}/scripts/$(dirname "${b}")" +done +for b in $(cd "${CONFDIR}/scripts" && find . -regex '.*/[a-z0-9_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")" done + echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do |