X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=b62e89b742b974edb8c44cebedd22fb90dfad232;hp=d14bbfbe83b537b0cb3c10de2915bb91420eb086;hb=dda6a44ba1325a176dc1e0f7020b32f03cf3b052;hpb=3106869a23e52ce7059ebc63bb45c1b7f4675dd0 diff --git a/grml-live b/grml-live index d14bbfb..b62e89b 100755 --- a/grml-live +++ b/grml-live @@ -157,6 +157,10 @@ umount_all() { umount $CHROOT_OUTPUT/dev/pts 2>/dev/null || /bin/true umount $CHROOT_OUTPUT/dev 2>/dev/null || /bin/true + if [ -n "$EXTRACT_ISO_NAME" ] ; then + umount "$EXTRACT_ISO_NAME" 2>/dev/null || /bin/true + fi + # certain FAI versions sadly leave a ramdisk behind, so better safe than sorry if [ -x /usr/lib/fai/mkramdisk ] ; then /usr/lib/fai/mkramdisk -u "$(readlink -f ${CHROOT_OUTPUT}/var/lib/dpkg)" >/dev/null 2>&1 || /bin/true @@ -549,7 +553,20 @@ if [ -n "$EXTRACT_ISO_NAME" ]; then eend 1 bailout 1 fi - unsquashfs -d "${CHROOT_OUTPUT}" "${mountpoint}"/live/*/*.squashfs ; rc=$? + + if ls "${mountpoint}"/live/*/*.squashfs 2>/dev/null | grep -q . ; then # ISOs >=2011.12 + log "Using ${mountpoint}/live/*/*.squashfs for unsquashfs" + unsquashfs -d "${CHROOT_OUTPUT}" "${mountpoint}"/live/*/*.squashfs ; rc=$? + elif ls "${mountpoint}"/live/*.squashfs 2>/dev/null | grep -q . ; then # ISOs before 2011.12 + log "Using ${mountpoint}/live/*.squashfs for unsquashfs" + unsquashfs -d "${CHROOT_OUTPUT}" "${mountpoint}"/live/*.squashfs ; rc=$? + else + log "Error: Could not find any *.squashfs files on the ISO" + eerror "Error: Could not find any *.squashfs files on the ISO" + eend 1 + bailout 1 + fi + umount "$mountpoint" rmdir "$mountpoint" if [ "$rc" != 0 ]; then