From 206d05900a6c123da61033069f39decf33331dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 8 Aug 2007 06:48:57 +0000 Subject: [PATCH] Make wait-kdc.sh able to wait on other things. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21839 ec53bebd-3082-4978-b11e-865c3cabbd6b --- tests/kdc/wait-kdc.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/kdc/wait-kdc.sh b/tests/kdc/wait-kdc.sh index 426916819..96ce267e7 100644 --- a/tests/kdc/wait-kdc.sh +++ b/tests/kdc/wait-kdc.sh @@ -34,26 +34,27 @@ # $Id$ # -log=${1:-messages.log} +name=${1:-KDC} +log=${2:-messages.log} t=0 waitsec=20 -echo "Waiting for KDC to start, looking logfile ${log}" +echo "Waiting for ${name} to start, looking logfile ${log}" while true ; do t=`expr ${t} + 2` sleep 2 echo "Have waited $t seconds" - if tail -3 ${log} | grep 'KDC started' > /dev/null; then + if tail -3 ${log} | grep "${name} started" > /dev/null; then break fi if tail -3 ${log} | grep "No sockets" ; then - echo "The KDC failed to bind to any sockets, another KDC running ?" + echo "The ${name} failed to bind to any sockets, another ${name} running ?" exit 1 fi if [ "$t" -gt $waitsec ]; then - echo "Waited for $waitsec for the KDC to start, and it didnt happen" + echo "Waited for $waitsec for the ${name} to start, and it didnt happen" exit 2 fi done