Merge "Remove old proc before finalising tinyipa"

This commit is contained in:
Zuul 2020-09-02 14:23:10 +00:00 committed by Gerrit Code Review
commit 040de9ce66
1 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,14 @@ fi
sudo -v
# Let's umount proc in case the old finalise process went sideways and
# it's still mounted
if grep -qs "$FINALDIR/proc" /proc/mounts; then
sudo umount "$FINALDIR/proc"
fi
# Remove the old final chroot dir with all its content before starting a new
# finalise process
if [ -d "$FINALDIR" ]; then
sudo rm -rf "$FINALDIR"
fi