diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-12-13 16:06:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-12-13 16:06:29 +0000 |
commit | 4a48e9856b106a96bf213418488e5f45dffa4559 (patch) | |
tree | 8d9a10c2c4ec2b1bfa8e8d62dc8475b076cfdd4c | |
parent | 670ad7b2dd0c1cb0280d504b54aa508ec26a8957 (diff) | |
download | drakx-4a48e9856b106a96bf213418488e5f45dffa4559.tar drakx-4a48e9856b106a96bf213418488e5f45dffa4559.tar.gz drakx-4a48e9856b106a96bf213418488e5f45dffa4559.tar.bz2 drakx-4a48e9856b106a96bf213418488e5f45dffa4559.tar.xz drakx-4a48e9856b106a96bf213418488e5f45dffa4559.zip |
use unsquashfs \o/ (thanks blino)
mounting squashfs is kernel dependant, and new squashfs format would imply
that the devel box must use latest kernel :-/
-rwxr-xr-x | tools/mdkinst_stage2_tool | 13 |
1 files 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 |