explicitly detach loop device on umount
I see cases where a stale loop device stays around and fills up my partition as image file is still in use and does not get unlinked. Explicitly detach loop device on umount to fix that. Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
49bd7ce4bd
commit
dced05a847
@ -59,7 +59,7 @@ _mount_airootfs() {
|
|||||||
|
|
||||||
_umount_airootfs() {
|
_umount_airootfs() {
|
||||||
_msg_info "Unmounting '${work_dir}/mnt/airootfs'"
|
_msg_info "Unmounting '${work_dir}/mnt/airootfs'"
|
||||||
umount "${work_dir}/mnt/airootfs"
|
umount -d "${work_dir}/mnt/airootfs"
|
||||||
_msg_info "Done!"
|
_msg_info "Done!"
|
||||||
rmdir "${work_dir}/mnt/airootfs"
|
rmdir "${work_dir}/mnt/airootfs"
|
||||||
trap - EXIT HUP INT TERM
|
trap - EXIT HUP INT TERM
|
||||||
|
@ -190,7 +190,7 @@ make_efiboot() {
|
|||||||
cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
|
cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
|
||||||
cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
|
cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
|
||||||
|
|
||||||
umount ${work_dir}/efiboot
|
umount -d ${work_dir}/efiboot
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build airootfs filesystem image
|
# Build airootfs filesystem image
|
||||||
|
Loading…
Reference in New Issue
Block a user