Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/hooks
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-01-05 17:58:12 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-01-05 17:58:12 -0300
commitd9f2f308d7e11404df58f57b28915696bf448bae (patch)
tree005b134052b7733a4ad07c27393f1d21740f6948 /archiso/hooks
parent0cee1b956b2e64cca0f85bf5e3ca85916498365a (diff)
[archiso] simplify _mnt_fs() and _mnt_sfs()
mount is now from util-linux (like in 87f3297ea37a4b8c80e4f7d0ab77b80f130e8362) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso/hooks')
-rw-r--r--archiso/hooks/archiso10
1 files changed, 4 insertions, 6 deletions
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index 7012343..2635a4c 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -30,15 +30,13 @@ _mnt_fs() {
local img_fullname="${img##*/}";
local img_name="${img_fullname%%.*}"
local dm_snap_name="${dm_snap_prefix}_${img_name}"
- local ro_dev ro_dev_size ro_dev_fs_type rw_dev
+ local ro_dev ro_dev_size rw_dev
mkdir -p "${newroot}${mnt}"
_next_loop_dev
ro_dev=$(_make_loop_dev "${img}")
ro_dev_size=$(blockdev --getsz ${ro_dev})
- ro_dev_fs_type=$(blkid -o value -s TYPE -p ${ro_dev} 2> /dev/null)
-
if [[ "${cow_persistent}" == "P" ]]; then
if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then
@@ -61,8 +59,8 @@ _mnt_fs() {
echo "0 ${ro_dev_size} snapshot ${ro_dev} ${rw_dev} ${cow_persistent} 8" | dmsetup create ${dm_snap_name}
- msg ":: Mounting '/dev/mapper/${dm_snap_name}' (${ro_dev_fs_type}) to '${newroot}${mnt}'"
- if ! mount -t "${ro_dev_fs_type}" "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" ; then
+ msg ":: Mounting '/dev/mapper/${dm_snap_name}' to '${newroot}${mnt}'"
+ if ! mount "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" ; then
echo "ERROR: while mounting '/dev/mapper/${dm_snap_name}' to '${newroot}${mnt}'"
launch_interactive_shell
else
@@ -89,7 +87,7 @@ _mnt_sfs() {
fi
_next_loop_dev
msg ":: Mounting '${img}' (SquashFS) to '${mnt}'"
- if ! mount -r -t squashfs $(_make_loop_dev "${img}") "${mnt}" &> /dev/null ; then
+ if ! mount -r $(_make_loop_dev "${img}") "${mnt}" &> /dev/null ; then
echo "ERROR: while mounting '${img}' to '${mnt}'"
launch_interactive_shell
fi