From 351c2976c5b84a59432ab98d4db6b684cb9cdda7 Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Mon, 5 Jan 2015 21:36:18 -0800 Subject: [PATCH] kill processes using archroot on installer exit --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index f9f68e0..3f6c71a 100755 --- a/install.sh +++ b/install.sh @@ -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