From f0b4c353371d3348fb436fbf69d9006b3f60f475 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 22 Feb 2012 19:37:10 -0300 Subject: [archiso] Use losetup/mount instead of mount directly *.sfs Signed-off-by: Gerardo Exequiel Pozzi --- archiso/hooks/archiso | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'archiso') diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso index 54c3223..abe9932 100644 --- a/archiso/hooks/archiso +++ b/archiso/hooks/archiso @@ -40,6 +40,7 @@ _mnt_sfs() { local img="${1}" local mnt="${2}" local img_fullname="${img##*/}" + local sfs_dev if [[ "${copytoram}" == "y" ]]; then msg -n ":: Copying squashfs image to RAM..." @@ -50,7 +51,8 @@ _mnt_sfs() { img="/run/archiso/copytoram/${img_fullname}" msg "done." fi - _mnt_dev "${img}" "${mnt}" "-r" + sfs_dev=$(losetup --find --show --read-only "${img}") + _mnt_dev "${sfs_dev}" "${mnt}" "-r" } # args: device, mountpoint, flags -- cgit v1.2.2