allow waiting for a user selected string

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23938 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-10-18 23:56:30 +00:00
parent 4ddaad680a
commit 8f0ce7af67

View File

@@ -36,6 +36,7 @@
name=${1:-KDC}
log=${2:-messages.log}
waitfor=${3:-${name} started}
t=0
waitsec=20
@@ -46,7 +47,7 @@ while true ; do
t=`expr ${t} + 2`
sleep 2
echo "Have waited $t seconds"
if tail -30 ${log} | grep "${name} started" > /dev/null; then
if tail -30 ${log} | grep "${waitfor}" > /dev/null; then
break
fi
if tail -30 ${log} | grep "No sockets" ; then