summaryrefslogtreecommitdiff
path: root/ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh')
-rw-r--r--ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh b/ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh
new file mode 100644
index 000000000000..79fe31d8541a
--- /dev/null
+++ b/ports-mgmt/tinderbox-devel/files/patch-lib__tinderlib.sh
@@ -0,0 +1,27 @@
+--- ./lib/tinderlib.sh.orig 2009-02-24 21:36:38.000000000 +0200
++++ ./lib/tinderlib.sh 2009-03-25 06:14:12.238205132 +0200
+@@ -23,7 +23,7 @@
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+-# $MCom: portstools/tinderbox/lib/tinderlib.sh,v 1.55.2.4 2008/11/10 07:03:02 marcus Exp $
++# $MCom: portstools/tinderbox/lib/tinderlib.sh,v 1.55.2.5 2009/03/14 23:57:13 marcus Exp $
+ #
+
+ tinderLocJail () {
+@@ -131,7 +131,14 @@
+
+ pids="XXX"
+ while [ ! -z "${pids}" ]; do
+- pids=$(fstat -f "${dir}" | tail +2 | awk '{print $3}' | sort -u)
++ # Lsof is more reliable when it comes to nullfs, so prefer it if
++ # found.
++ lsof=$(which lsof 2>/dev/null)
++ if [ -n "${lsof}" ]; then
++ pids=$(${lsof} | fgrep "${dir}" | awk '{print $2}' | sort -u)
++ else
++ pids=$(fstat -f "${dir}" | tail +2 | awk '{print $3}' | sort -u)
++ fi
+
+ if [ ! -z "${pids}" ]; then
+ echo "Killing off pids in ${dir}"