From: Will Woods Date: Tue, 8 Mar 2011 23:35:16 +0000 (-0500) Subject: Look for btrfs.img in dmsquash-live-root X-Git-Tag: 009~77 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=533318113b147ec81f71797b57a353eaf857243c;p=thirdparty%2Fdracut.git Look for btrfs.img in dmsquash-live-root Btrfs is an excellent option for the root fs image for live systems, especially since it does its own transparent compression. --- diff --git a/modules.d/90dmsquash-live/dmsquash-live-root b/modules.d/90dmsquash-live/dmsquash-live-root index 95ef05dc3..f8aa805ae 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root +++ b/modules.d/90dmsquash-live/dmsquash-live-root @@ -127,6 +127,8 @@ fi # we might have an embedded fs image to use as rootfs (uncompressed live) if [ -e /dev/.initramfs/live/${live_dir}/ext3fs.img ]; then FSIMG="/dev/.initramfs/live/${live_dir}/ext3fs.img" +elif [ -e /dev/.initramfs/live/${live_dir}/btrfs.img ]; then + FSIMG="/dev/.initramfs/live/${live_dir}/btrfs.img" fi if [ -n "$FSIMG" ] ; then @@ -158,7 +160,11 @@ if [ -e "$SQUASHED" ] ; then mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /squashfs BASE_LOOPDEV=$( losetup -f ) - losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img + if [ -f /squashfs/LiveOS/ext3fs.img ]; then + losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img + elif [ -f /squashfs/LiveOS/btrfs.img ]; then + losetup -r $BASE_LOOPDEV /squashfs/LiveOS/btrfs.img + fi umount -l /squashfs