summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-06-27 11:45:49 +1000
committerMartin Schwenke <martin@meltin.net>2014-07-02 14:17:17 +1000
commitef72de0899d54d341ad8b9cb81e27ea27aa29bf8 (patch)
treefb7886b671a95a1ec390fa5c50ada15baacbddc8 /base
parent0aa1c68a8fe6116b2867dc26bbccbb90e8f1fabd (diff)
downloadautocluster-ef72de0899d54d341ad8b9cb81e27ea27aa29bf8.tar.gz
autocluster-ef72de0899d54d341ad8b9cb81e27ea27aa29bf8.tar.xz
autocluster-ef72de0899d54d341ad8b9cb81e27ea27aa29bf8.zip
Replace external waitfor script with a function
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'base')
-rwxr-xr-xbase/all/usr/bin/waitfor30
1 files changed, 0 insertions, 30 deletions
diff --git a/base/all/usr/bin/waitfor b/base/all/usr/bin/waitfor
deleted file mode 100755
index cb296d3..0000000
--- a/base/all/usr/bin/waitfor
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-# wait for a string to appear at the end of file
-# tridge@samba.org July 2008
-
-[ $# -lt 3 ] && {
- cat <<EOF
-Usage: waitfor FILE MESSAGE TIMEOUT
-EOF
-exit 1
-}
-
-file="$1"
-msg="$2"
-timeout="$3"
-
-tmpfile=`mktemp`
-
-cat <<EOF > $tmpfile
-spawn tail -n 10000 -f $file
-expect -timeout $timeout "$msg"
-EOF
-
-expect $tmpfile
-rm -f $tmpfile
-
-if ! grep "$msg" $file > /dev/null; then
- echo "Failed to find \"$msg\" in $file"
- exit 1
-fi
-exit 0