Skip to content
Snippets Groups Projects
Commit b1011376 authored by Christian Hesse's avatar Christian Hesse :stuck_out_tongue_winking_eye: Committed by Gerardo Pozzi
Browse files

explicitly detach loop device on umount and silent losetup error


Umount detaches the loop device automatically, but let's make it
explicit to be sure. Additionally losetup gives:

losetup: /dev/loop0: detach failed: No such device or address

This is kind of expected, let's silent the error message.

Signed-off-by: default avatarChristian Hesse <mail@eworm.de>
parent f0452f22
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@ archiso_mount_handler() {
fi
if [[ "${copytoram}" == "y" ]]; then
umount /run/archiso/bootmnt
umount -d /run/archiso/bootmnt
fi
}
......
......@@ -26,7 +26,7 @@ archiso_loop_mount_handler () {
archiso_mount_handler ${newroot}
if [[ "${copytoram}" == "y" ]]; then
losetup -d ${_dev_loop}
losetup -d ${_dev_loop} 2>/dev/null
umount /run/archiso/img_dev
fi
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment