dmsquash-live: use 'rootfs.img' for rootfs image name
Every image gets handled the same way regardless of filesystem, so let's use a filesystem-neutral name (rather than adding new lines for every fstype anyone might want to use).master
parent
6927f09e1c
commit
fe17f4e86b
|
@ -48,7 +48,7 @@ if [ -f $livedev ]; then
|
||||||
# no mount needed - we've already got the LiveOS image in initramfs
|
# no mount needed - we've already got the LiveOS image in initramfs
|
||||||
case $livedev in
|
case $livedev in
|
||||||
*squashfs.img) SQUASHED=$livedev ;;
|
*squashfs.img) SQUASHED=$livedev ;;
|
||||||
*ext3fs.img|*btrfs.img) FSIMG=$livedev ;;
|
*ext3fs.img|*rootfs.img) FSIMG=$livedev ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
mount -n -t $fstype -o $liverw $livedev /dev/.run/initramfs/live
|
mount -n -t $fstype -o $liverw $livedev /dev/.run/initramfs/live
|
||||||
|
@ -135,8 +135,8 @@ fi
|
||||||
# we might have an embedded fs image to use as rootfs (uncompressed live)
|
# we might have an embedded fs image to use as rootfs (uncompressed live)
|
||||||
if [ -e /dev/.run/initramfs/live/${live_dir}/ext3fs.img ]; then
|
if [ -e /dev/.run/initramfs/live/${live_dir}/ext3fs.img ]; then
|
||||||
FSIMG="/dev/.run/initramfs/live/${live_dir}/ext3fs.img"
|
FSIMG="/dev/.run/initramfs/live/${live_dir}/ext3fs.img"
|
||||||
elif [ -e /dev/.run/initramfs/live/${live_dir}/btrfs.img ]; then
|
elif [ -e /dev/.run/initramfs/live/${live_dir}/rootfs.img ]; then
|
||||||
FSIMG="/dev/.run/initramfs/live/${live_dir}/btrfs.img"
|
FSIMG="/dev/.run/initramfs/live/${live_dir}/rootfs.img"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$FSIMG" ] ; then
|
if [ -n "$FSIMG" ] ; then
|
||||||
|
@ -170,8 +170,8 @@ if [ -e "$SQUASHED" ] ; then
|
||||||
BASE_LOOPDEV=$( losetup -f )
|
BASE_LOOPDEV=$( losetup -f )
|
||||||
if [ -f /squashfs/LiveOS/ext3fs.img ]; then
|
if [ -f /squashfs/LiveOS/ext3fs.img ]; then
|
||||||
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img
|
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img
|
||||||
elif [ -f /squashfs/LiveOS/btrfs.img ]; then
|
elif [ -f /squashfs/LiveOS/rootfs.img ]; then
|
||||||
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/btrfs.img
|
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/rootfs.img
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umount -l /squashfs
|
umount -l /squashfs
|
||||||
|
|
Loading…
Reference in New Issue