From c98c8fdb7ce349dca24c1f6fdeabfcd03e620f22 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 15 Nov 2007 22:47:31 +0100 Subject: [PATCH] Remove .bak initrd files --- debian/changelog | 4 ++-- grml-live | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8826aa1..595d797 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,8 @@ grml-live (0.0.9) unstable; urgency=low * Support kernel upgrades via according /etc/kernel-img.conf configuration. * Set hostname in instsoft-hook already. * Add user (grml) to all relevant groups. - * Improve initrd+kernel copy process (ignore .bak files and - copy always exactly one image). + * Improve initrd+kernel copy process: ignore .bak files (and get rid + of them) and copy always exactly one image. * Add new packages to GRML_FULL: - etckeeper - hdapsd diff --git a/grml-live b/grml-live index 877bb1e..9c55ab6 100755 --- a/grml-live +++ b/grml-live @@ -391,6 +391,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then INITRD="$(ls $CHROOT_OUTPUT/boot/initrd* 2>/dev/null| grep -v '.bak$' | sort -r | head -1)" if [ -n "$INITRD" ] ; then cp $INITRD "$BUILD_OUTPUT"/boot/isolinux/initrd.gz + find $CHROOT_OUTPUT/boot/ -name initrd\*.bak -exec rm {} \; else log "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting" eerror "No initrd found inside $CHROOT_OUTPUT/boot/ - Exiting" ; eend 1 @@ -398,7 +399,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then fi KERNEL_IMAGE="$(ls $CHROOT_OUTPUT/boot/vmlinuz* 2>/dev/null | sort -r | head -1)" - if [ -n "$INITRD" ] ; then + if [ -n "$KERNEL_IMAGE" ] ; then cp "$KERNEL_IMAGE" "$BUILD_OUTPUT"/boot/isolinux/linux26 else log "No kernel found inside $CHROOT_OUTPUT/boot/ - Exiting" -- 2.1.4