From f8fd08887d3278d9e3a4733b9e6bf57a4d6c0176 Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 23 Jun 2014 12:45:07 +0200 Subject: [PATCH] wait for termination to avoid busy chroot --- findunusedbd.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/findunusedbd.sh b/findunusedbd.sh index bca3941..1dfb3cc 100755 --- a/findunusedbd.sh +++ b/findunusedbd.sh @@ -35,6 +35,8 @@ if [ "$#" -eq 1 ]; then echo $namever fi done > "${tmpdir}/unneededdepends.list" < "${tmpdir}/bdselection.list" + # signal that the script is about to exit + echo > "${tmpdir}/myfifo" elif [ "$#" -eq 2 ]; then case "$1" in chroot-setup) @@ -75,6 +77,8 @@ elif [ "$#" -eq 2 ]; then tmpdir="$2" # signal that the build is done echo > "${tmpdir}/myfifo" + # wait for the parent process to finish and exit + cat "${tmpdir}/myfifo" > /dev/null ;; equivs) namever="$2"