summaryrefslogtreecommitdiff
path: root/archiso/hooks/archiso_loop_mnt
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-10-23 21:24:17 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-10-23 21:24:17 -0300
commit90fb8ea480dd2cc475963c0f29a412c9366c3f98 (patch)
tree2ee1afefd00673841ec90752bb2dfc0acc55cac2 /archiso/hooks/archiso_loop_mnt
parente2055835fda3d2c99378231e4595472bf28631c4 (diff)
downloadarchiso32-90fb8ea480dd2cc475963c0f29a412c9366c3f98.tar.xz
[archiso] Mount all fs on /run/archiso instead of /
This allow to take control again of these mountpoints outside initramfs. (i.e: on deinitramfs stage at shutdown for unmount it) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso/hooks/archiso_loop_mnt')
-rw-r--r--archiso/hooks/archiso_loop_mnt5
1 files changed, 3 insertions, 2 deletions
diff --git a/archiso/hooks/archiso_loop_mnt b/archiso/hooks/archiso_loop_mnt
index 13f8743..18419e3 100644
--- a/archiso/hooks/archiso_loop_mnt
+++ b/archiso/hooks/archiso_loop_mnt
@@ -20,9 +20,10 @@ archiso_loop_mount_handler () {
msg "::: Setup a loop device from ${img_loop} located at device ${img_dev}"
FSTYPE=$(blkid -o value -s TYPE -p ${img_dev} 2> /dev/null)
if [ -n "${FSTYPE}" ]; then
- if mount -r -t "${FSTYPE}" ${img_dev} /img_dev > /dev/null 2>&1; then
+ mkdir -p /run/archiso/img_dev
+ if mount -r -t "${FSTYPE}" ${img_dev} /run/archiso/img_dev > /dev/null 2>&1; then
_dev_loop=$(losetup -f)
- losetup ${_dev_loop} /img_dev/${img_loop}
+ losetup ${_dev_loop} /run/archiso/img_dev/${img_loop}
fi
fi