Remove old proc before finalising tinyipa
When building locally, if the finalise process fails, it might happen that the old proc filesystem mounted for the chroot jail is still there. Unmount it before removing the old finaldir to prevent the script to fail early. Change-Id: I0ffe7c71ca3145202ffd5412434e6ce163df53fe
This commit is contained in:
parent
b609df3111
commit
8556bdacbd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user