cleanup SLEEPs

This commit is contained in:
Pierangelo Masarati 2005-12-15 19:13:05 +00:00
parent 3edbd4fee7
commit 9cd9638d89

View File

@ -172,8 +172,9 @@ if test $RC != 0 ; then
exit $RC exit $RC
fi fi
echo "Waiting 15 seconds for syncrepl to receive changes..." SLEEP=15
sleep 15 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
# first check # first check
#echo "Using ldapsearch to read all the entries from the master..." #echo "Using ldapsearch to read all the entries from the master..."
@ -212,10 +213,12 @@ if test $? != 0 ; then
exit 1 exit 1
fi fi
echo "Stopping the provider, sleeping 10 seconds and restarting it..." SLEEP=10
echo "Stopping the provider, sleeping $SLEEP seconds and restarting it..."
kill -HUP "$MASTERPID" kill -HUP "$MASTERPID"
sleep 10 sleep $SLEEP
echo "RESTART" >> $LOG1
echo "======================= RESTART =======================" >> $LOG1
$SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 & $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
MASTERPID=$! MASTERPID=$!
if test $WAIT != 0 ; then if test $WAIT != 0 ; then
@ -331,8 +334,9 @@ if test $RC != 0 ; then
exit $RC exit $RC
fi fi
echo "Waiting 15 seconds for syncrepl to receive changes..." SLEEP=15
sleep 15 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
# second check # second check
#echo "Using ldapsearch to read all the entries from the master..." #echo "Using ldapsearch to read all the entries from the master..."
@ -371,9 +375,10 @@ if test $? != 0 ; then
exit 1 exit 1
fi fi
echo "Stopping proxy to test recovery..." SLEEP=10
echo "Stopping proxy to test recovery; sleep for $SLEEP seconds..."
kill -HUP $PROXYPID kill -HUP $PROXYPID
sleep 10 sleep $SLEEP
echo "Modifying more entries on the master..." echo "Modifying more entries on the master..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \ $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
@ -400,7 +405,7 @@ cn: Tiberius J. Hooker
EOMODS EOMODS
echo "Restarting proxy..." echo "Restarting proxy..."
echo "RESTART" >> $LOG3 echo "======================= RESTART =======================" >> $LOG3
$SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 & $SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 &
PROXYPID=$! PROXYPID=$!
if test $WAIT != 0 ; then if test $WAIT != 0 ; then
@ -409,8 +414,9 @@ if test $WAIT != 0 ; then
fi fi
KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID" KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
echo "Waiting 25 seconds for syncrepl to receive changes..." SLEEP=25
sleep 25 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
# third check # third check
#echo "Using ldapsearch to read all the entries from the master..." #echo "Using ldapsearch to read all the entries from the master..."
@ -468,8 +474,9 @@ EOMODS
exit $RC exit $RC
fi fi
echo "Waiting 15 seconds for syncrepl to receive changes..." SLEEP=15
sleep 15 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
fi fi
# fourth check # fourth check
@ -509,9 +516,10 @@ if test $? != 0 ; then
exit 1 exit 1
fi fi
echo "Stopping consumer to test recovery..." SLEEP=10
echo "Stopping consumer to test recovery; wait $SLEEP seconds..."
kill -HUP $SLAVEPID kill -HUP $SLAVEPID
sleep 10 sleep $SLEEP
echo "Modifying more entries on the master..." echo "Modifying more entries on the master..."
$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \ $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
@ -524,7 +532,7 @@ drink: Mad Dog 20/20
EOMODS EOMODS
echo "Restarting consumer..." echo "Restarting consumer..."
echo "RESTART" >> $LOG2 echo "======================= RESTART =======================" >> $LOG2
$SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 & $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
SLAVEPID=$! SLAVEPID=$!
if test $WAIT != 0 ; then if test $WAIT != 0 ; then
@ -533,8 +541,9 @@ if test $WAIT != 0 ; then
fi fi
KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID" KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID"
echo "Waiting 25 seconds for syncrepl to receive changes..." SLEEP=25
sleep 25 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
# fifth check # fifth check
#echo "Using ldapsearch to read all the entries from the master..." #echo "Using ldapsearch to read all the entries from the master..."
@ -600,8 +609,9 @@ if test $RC != 0 ; then
exit $RC exit $RC
fi fi
echo "Waiting 15 seconds for syncrepl to receive changes..." SLEEP=15
sleep 15 echo "Waiting $SLEEP seconds for syncrepl to receive changes..."
sleep $SLEEP
# sixth check # sixth check
#echo "Using ldapsearch to read all the entries from the master..." #echo "Using ldapsearch to read all the entries from the master..."