kill processes using archroot on installer exit

This commit is contained in:
Gavin Li 2015-01-05 21:36:18 -08:00
parent 99c1699ae6
commit 351c2976c5
1 changed files with 7 additions and 0 deletions

View File

@ -413,6 +413,13 @@ installer_error_occurred() {
installer_exit_cleanup() {
log "Cleaning up ..."
set +e
for rt in /proc/*/root; do
if [ -h ${rt} ] && [ "$(readlink ${rt})" = "/archroot" ]; then
rt=${rt#/proc/}
rt=${rt%/root}
kill -9 ${rt}
fi
done
umount /archroot/dev/pts
umount /archroot/dev
umount /archroot/sys