Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-02-22 19:26:49 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-02-22 21:18:15 -0300
commita89e03fef0dcd18914f0545799635f0280df3c46 (patch)
treec42c0e390c0b2c6a378d19331c05fccfb1a6b37e /archiso
parent7c6c7e1ca52d595a93491b2cef0e6a67a9c4d681 (diff)
[archiso] Setup ro loop devs as read-only
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso')
-rw-r--r--archiso/hooks/archiso2
-rw-r--r--archiso/hooks/archiso_loop_mnt2
2 files changed, 2 insertions, 2 deletions
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index bd7aea7..54c3223 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -8,7 +8,7 @@ _mnt_fs() {
local dm_snap_name="${dm_snap_prefix}_${img_name}"
local ro_dev ro_dev_size rw_dev
- ro_dev=$(losetup --find --show "${img}")
+ ro_dev=$(losetup --find --show --read-only "${img}")
ro_dev_size=$(blockdev --getsz ${ro_dev})
if [[ "${cow_persistent}" == "P" ]]; then
diff --git a/archiso/hooks/archiso_loop_mnt b/archiso/hooks/archiso_loop_mnt
index 664f3a5..4fa2910 100644
--- a/archiso/hooks/archiso_loop_mnt
+++ b/archiso/hooks/archiso_loop_mnt
@@ -15,7 +15,7 @@ archiso_loop_mount_handler () {
msg ":: Setup a loop device from ${img_loop} located at device ${img_dev}"
_mnt_dev "${img_dev}" "/run/archiso/img_dev" "-r"
- if ! _dev_loop=$(losetup --find --show "/run/archiso/img_dev/${img_loop}"); then
+ if ! _dev_loop=$(losetup --find --show --read-only "/run/archiso/img_dev/${img_loop}"); then
echo "ERROR: Setting loopback device for file '/run/archiso/img_dev/${img_loop}'"
launch_interactive_shell
fi