Don't ever use umount -l if you want to act on the device afterwards (e.g. by using kpartx -d)

This commit is contained in:
Steve Langasek 2017-01-04 15:31:55 -08:00
parent 2c45a24efd
commit c7d9dc0e78
1 changed files with 4 additions and 4 deletions

View File

@ -67,10 +67,10 @@ cleanup_noexit() {
[ -n "${CACHEDIR}" ] && {
sync
sudo umount -l ${CACHEDIR}/mnt/{dev,proc,sys}
sudo umount -l ${CACHEDIR}/mnt
sudo umount -l ${CACHEDIR}/lower
sudo umount -l ${CACHEDIR}/upper
sudo umount -l ${CACHEDIR}/efimnt
sudo umount ${CACHEDIR}/mnt
sudo umount ${CACHEDIR}/lower
sudo umount ${CACHEDIR}/upper
sudo umount ${CACHEDIR}/efimnt
sudo kpartx -d ${CACHEDIR}/installer.img &>/dev/null || exit
for DEV in $EFI_DEV $ROOTFS_DEV $OVERLAY_DEV; do
[ -e "/dev/mapper/`basename $DEV`" ] && {