mklni: Fix unsafe remove_chroot

This commit is contained in:
timoxa0 2024-11-02 23:13:01 +05:00
parent 6c4d6008e3
commit 22be3bc759

7
mklni
View file

@ -281,8 +281,13 @@ remove_chroot()
log "Failed to umount chroot" error log "Failed to umount chroot" error
exit 1 exit 1
} }
{
rm -rf "${CHROOTDIR:?}/" &&
log "Done!" log "Done!"
rm -rf "${CHROOTDIR:?}/" } || {
log "Failed to remove chroot" error
exit 1
}
} }
chroot_into() chroot_into()