From 4a48e9856b106a96bf213418488e5f45dffa4559 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 13 Dec 2007 16:06:29 +0000 Subject: use unsquashfs \o/ (thanks blino) mounting squashfs is kernel dependant, and new squashfs format would imply that the devel box must use latest kernel :-/ --- tools/mdkinst_stage2_tool | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/mdkinst_stage2_tool b/tools/mdkinst_stage2_tool index 22712515a..c1ef5d151 100755 --- a/tools/mdkinst_stage2_tool +++ b/tools/mdkinst_stage2_tool @@ -48,23 +48,18 @@ if [ $ACTION = "--compress" ]; then exit 1 fi else + which unsquashfs >/dev/null 2>/dev/null || { echo "missing command unsquashfs (from squashfs-tools)"; exit 1; } + [ -f "$COMPRESSED_IMAGE" ] || error echo "Creating $LIVE_DIR from $COMPRESSED_IMAGE" - TMPDIR=${TMPDIR=/tmp} - MNTPOINT=$TMPDIR/stage2_img - if [ $EUID != "0" ]; then SUDO="sudo" PATH="/sbin:/usr/sbin:$PATH" fi - $SUDO umount $MNTPOINT 2>/dev/null - mkdir -p $MNTPOINT - $SUDO mount -o loop -t squashfs $COMPRESSED_IMAGE $MNTPOINT || { echo "can not loopback mount $COMPRESSED_IMAGE"; exit 1; } - mkdir $LIVE_DIR || { echo "not enough space"; exit 1; } - cp -a $MNTPOINT/* $LIVE_DIR/ || { rm -rf $LIVE_DIR; exit 1; } - $SUDO umount $MNTPOINT + unsquashfs -dest $LIVE_DIR $COMPRESSED_IMAGE || { rm -rf $LIVE_DIR; exit 1; } + [ -n "$CLEAN" ] && rm -f $COMPRESSED_IMAGE fi -- cgit v1.2.1