From 46758a21be579dd6e3f083c117437fbed14d760d Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Thu, 1 Jun 2006 21:54:18 +0000 Subject: [PATCH] Using fuser instead of pidof to watch that make is alive. --- CLFS/master.sh | 1 - HLFS/master.sh | 1 - LFS/master.sh | 1 - common/common-functions | 2 +- common/progress_bar.sh | 4 ++-- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/CLFS/master.sh b/CLFS/master.sh index d3f7cb6..0c28f03 100755 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -992,7 +992,6 @@ $HEADER SRC= /sources MOUNT_PT= $BUILDDIR PKG_LST= $PKG_LST -MAKE_PID=\`pidof make | cut -d " " -f1\` include makefile-functions diff --git a/HLFS/master.sh b/HLFS/master.sh index c72b7d7..1e2b13d 100755 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -484,7 +484,6 @@ $HEADER SRC= /sources MOUNT_PT= $BUILDDIR PKG_LST= $PKG_LST -MAKE_PID=\`pidof make | cut -d " " -f1\` include makefile-functions diff --git a/LFS/master.sh b/LFS/master.sh index 498254c..f5aecb3 100755 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -356,7 +356,6 @@ $HEADER SRC= /sources MOUNT_PT= $BUILDDIR PKG_LST= $PKG_LST -MAKE_PID=\`pidof make | cut -d " " -f1\` include makefile-functions diff --git a/common/common-functions b/common/common-functions index 1b1d1bd..b3c53bf 100644 --- a/common/common-functions +++ b/common/common-functions @@ -201,7 +201,7 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) - @./progress_bar.sh \$@ \$(MAKE_PID) & + @./progress_bar.sh \$@ & @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >logs/$LOGFILE EOF ) >> $MKFILE.tmp diff --git a/common/progress_bar.sh b/common/progress_bar.sh index 353abed..04303ef 100755 --- a/common/progress_bar.sh +++ b/common/progress_bar.sh @@ -5,11 +5,11 @@ set -e [[ -z $1 ]] && exit -[[ -z $2 ]] && exit if [ ! -f $1 ] ; then - while [ -d /proc/$2 ] ; do + while fuser -v . 2>&1 | grep make >/dev/null ; do echo -n "." sleep 1 + [[ -f $1 ]] && exit done fi