index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2012-01-09 20:33:35 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2012-01-11 04:44:41 -0300 |
commit | 24bb012f60e8490e975c8f419a39c5e3d58e9c04 (patch) | |
tree | 9eef2f195adaee07619fe1bff82651b5f28340ff /archiso/hooks/archiso_loop_mnt | |
parent | d9f2f308d7e11404df58f57b28915696bf448bae (diff) |
-rw-r--r-- | archiso/hooks/archiso_loop_mnt | 10 |
diff --git a/archiso/hooks/archiso_loop_mnt b/archiso/hooks/archiso_loop_mnt index e52dc69..664f3a5 100644 --- a/archiso/hooks/archiso_loop_mnt +++ b/archiso/hooks/archiso_loop_mnt @@ -10,15 +10,13 @@ run_hook () { archiso_loop_mount_handler () { newroot="${1}" + local _dev_loop + msg ":: Setup a loop device from ${img_loop} located at device ${img_dev}" _mnt_dev "${img_dev}" "/run/archiso/img_dev" "-r" - _dev_loop=$(losetup -f) - if ! losetup "${_dev_loop}" "/run/archiso/img_dev/${img_loop}"; then - echo "ERROR: Setting loopback device '${_dev_loop}'" - echo " for file '/run/archiso/img_dev/${img_loop}'" - echo " Falling back to interactive prompt" - echo " You can try to fix the problem manually, log out when you are finished" + if ! _dev_loop=$(losetup --find --show "/run/archiso/img_dev/${img_loop}"); then + echo "ERROR: Setting loopback device for file '/run/archiso/img_dev/${img_loop}'" launch_interactive_shell fi |