X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=9c55ab6f5ce07be5517cfaa22b31f3f39edc307f;hp=1becf15ed8f7e6ba676281f2dad4350db4b461a1;hb=cd32c0f2e48575284125f4f8f3dcd56747bee035;hpb=822c1ca687fbc1af75de3b6c8651896a71c9f638 diff --git a/grml-live b/grml-live index 1becf15..9c55ab6 100755 --- a/grml-live +++ b/grml-live @@ -388,16 +388,25 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then # if we don't have an initrd we a) can't boot and b) there was an error # during build, so check for the file: - if [ -f "$CHROOT_OUTPUT"/boot/initrd* ] ; then - cp "$CHROOT_OUTPUT"/boot/initrd* "$BUILD_OUTPUT"/boot/isolinux/initrd.gz + 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 bailout 10 fi - KERNEL_IMAGE="$(ls $CHROOT_OUTPUT/boot/vmlinuz* | sort -r | head -1)" - cp "$KERNEL_IMAGE" "$BUILD_OUTPUT"/boot/isolinux/linux26 + KERNEL_IMAGE="$(ls $CHROOT_OUTPUT/boot/vmlinuz* 2>/dev/null | sort -r | head -1)" + if [ -n "$KERNEL_IMAGE" ] ; then + cp "$KERNEL_IMAGE" "$BUILD_OUTPUT"/boot/isolinux/linux26 + else + log "No kernel found inside $CHROOT_OUTPUT/boot/ - Exiting" + eerror "No kernel found inside $CHROOT_OUTPUT/boot/ - Exiting" ; eend 1 + bailout 11 + fi + cp /usr/lib/syslinux/chain.c32 "$BUILD_OUTPUT"/boot/isolinux/ cp /usr/lib/syslinux/isolinux.bin "$BUILD_OUTPUT"/boot/isolinux/ cp /usr/lib/syslinux/memdisk "$BUILD_OUTPUT"/boot/isolinux/ @@ -459,7 +468,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then ( cd "$BUILD_OUTPUT"/windows for file in pageant plink pscp psftp putty puttygen ; do wget -O ${file}.exe ${WINDOWS_BINARIES}/${file}.exe - md5sum ${WINDOWS_BINARIES}/${file}.exe > ${WINDOWS_BINARIES}/${file}.exe.md5 + md5sum ${file}.exe > ${file}.exe.md5 done ) fi fi