safer-timeout
authorDebian QA Group <packages@qa.debian.org>
Sat, 27 Feb 2016 18:07:25 +0000 (18:07 +0000)
committerAndreas Beckmann <anbe@debian.org>
Sat, 27 Feb 2016 18:07:25 +0000 (18:07 +0000)
Gbp-Pq: Name safer-timeout.patch

33 files changed:
appsrc/ODS-Addressbook/make_vad.sh
appsrc/ODS-Blog/make_vad.sh
appsrc/ODS-Bookmark/make_vad.sh
appsrc/ODS-Briefcase/make_vad.sh
appsrc/ODS-Calendar/make_vad.sh
appsrc/ODS-Community/make_vad.sh
appsrc/ODS-Discussion/make_vad.sh
appsrc/ODS-FeedManager/make_vad.sh
appsrc/ODS-Framework/make_vad.sh
appsrc/ODS-Framework/oauth/make_vad.sh
appsrc/ODS-Gallery/make_vad.sh
appsrc/ODS-Polls/make_vad.sh
appsrc/ODS-WebMail/make_vad.sh
appsrc/ODS-Wiki/make_vad.sh
binsrc/b3s/make_vad.sh
binsrc/bpel/make_vad.sh
binsrc/hosting/mono/tests/tclrsrv.sh
binsrc/isparql/make_vad.sh
binsrc/rdf_mappers/make_vad.sh
binsrc/samples/demo/make_vad.sh
binsrc/samples/demo/mkdemo.sh
binsrc/samples/demo/mkdoc.sh
binsrc/samples/sparql_demo/make_vad.sh
binsrc/samples/xpath/files2dav.sh
binsrc/samples/xquery/files2dav.sh
binsrc/sync/make_vad.sh
binsrc/tests/biftest/thook.sh
binsrc/tests/suite/test_fn.sh
binsrc/tests/suite/tpc-d/tpcd.sh
binsrc/tutorial/make_vad.sh
binsrc/vsp/admin/debug/make_vad.sh
binsrc/vspx/suite/vspx_suite.sh
binsrc/yacutia/mkvad.sh

index 74f56388e7c7ee894972bb3d7708cd505841ede1..ef8242a1e2b713e78d7e4a0dc93f1edabedcc201 100755 (executable)
@@ -152,7 +152,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -163,17 +163,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 9586a1989618ad75cf358ae9bb444066137dc361..f3e56e182ef16e434a22a33dfc21d81da22e9b8f 100755 (executable)
@@ -122,7 +122,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -133,17 +133,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 1ca73f0e27db0dc1888fd3fe864a13a41bb1bd99..33082eea2f9660b61679e91d2ea7a8837756c214 100755 (executable)
@@ -152,7 +152,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -163,17 +163,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 4d31821307c9ff77737697eb3790c5912e3bc42b..6fc73aded82a49b0003d9e2c03ae8e44b656666f 100755 (executable)
@@ -163,7 +163,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -174,17 +174,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index ce0d29a998ad3636fc39ca990dbd67291a2ce479..d9bd612780bb84e8dff2082e0009fc185626ae8f 100755 (executable)
@@ -151,7 +151,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -162,17 +162,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index fbc32f96a88ad8dd3ebe144f78a65fb538125f9a..847857dc578e779c7637fdc8fd4953499e5d525c 100755 (executable)
@@ -147,7 +147,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -158,17 +158,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index d0717d8279c452d154f6b8b9363602e4e52c8ba5..4ac4df935e46b5fa88b4512a913a608eaf92b419 100755 (executable)
@@ -119,7 +119,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -130,17 +130,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 31dd02f521a064abc5b9207258b248a22adc4f5c..4f1dc1c2ead54e0432fa5d9a83ee23d7ec3a502f 100755 (executable)
@@ -151,7 +151,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -162,17 +162,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 44a986fd4005a55aa4dadad3ca45d99db441d703..33a7ce6f1474dfd595d3259414298a7d2fc24dc3 100755 (executable)
@@ -149,7 +149,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -160,17 +160,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 57fa0edfa76090ba1263710734297554e8054e32..c5d3118fa7a760a8a1679e9e7c0e19c00d956ca9 100755 (executable)
@@ -197,7 +197,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -208,17 +208,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 virtuoso_shutdown() {
index 3cbc16de3a8cbc8b06863b4e2e755afb87814c2c..f5163d5fd71755ddf3f0991b1e8856c457e6af56 100755 (executable)
@@ -135,7 +135,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -146,17 +146,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 3cd46d3a47bc3f6dcd1a060d01357f912cb60407..bf8da0adc0ea92a83a5fece06077ded65e3a3331 100755 (executable)
@@ -139,7 +139,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -150,17 +150,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 647c6c3423a42e9d5e2cc77bb7bebf0737e329fa..e10383ed924d50d5b1f0a27f4534dea18ba9db8c 100755 (executable)
@@ -150,7 +150,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -161,17 +161,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 73d8b11b0c00b9abaa432307ea35ef464bd1a64d..f8c9bd223b27da76a05113184ea15b8008dc453f 100755 (executable)
@@ -141,7 +141,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true 
+  for i in $(seq 1 15) 
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -152,17 +152,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 39671fa4c2b321b2ded46d7bfb476a1faefea888..d61521e9af8f38982ae62b0a4c8d180610340b17 100755 (executable)
@@ -213,7 +213,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -224,17 +224,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 virtuoso_shutdown() {
index b04518dc4f73bd8caf37e89d0d9b00cd966a37da..cb93e018022671fbdc6c470f12154bcf97840662 100755 (executable)
@@ -263,7 +263,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -274,17 +274,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 virtuoso_shutdown() {
index 8f3237fa70d9373f3026a32ea78ac82c9c200a74..5cf92b5659ddfcbcbc23b0228fe5e1a1f4409f5b 100755 (executable)
@@ -221,7 +221,7 @@ START_SERVER ()
       rm -f *.lck
       $SERVER +foreground -c tclr.ini $* 1>/dev/null & 
       stat="true"
-      while true 
+      for i in $(seq 1 15) 
        do
          sleep 4
              stat=`netstat -an | grep "[\.\:]$PORT " | grep LISTEN` 
@@ -231,20 +231,9 @@ START_SERVER ()
                    LOG "PASSED: Virtuoso Server successfully started on port $port"
                    return 0
              fi
-               
-         nowh=`date | cut -f 2 -d :`
-          nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    
-          nowh=`expr $nowh - $starth`
-          nows=`expr $nows - $starts`
-    
-          nows=`expr $nows + $nowh \*  60`
-          if test $nows -ge $timeout
-          then
+        done
               LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
               return 1
-          fi
-        done
 }
 
 WAITALL ()
index 5a3cf226c37939debb498e4d8b5aa9d1bd3cd162..f4decfd8ef012a74fbf01569a4775079a8df630d 100755 (executable)
@@ -126,7 +126,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -137,17 +137,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 788476896554f756a26a278692ef7d7f665b037b..feda630da59b0439f7fad790e1640ea50a999e12 100755 (executable)
@@ -260,7 +260,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -271,17 +271,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 virtuoso_shutdown() {
index d5845b21e512beb62bf12651ba87ce42af5799fc..45e9fadb1e07c1582aabc67aec423dd449d8df5d 100755 (executable)
@@ -124,7 +124,7 @@ virtuoso_start() {
       "$SERVER" +wait
   fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -135,17 +135,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index be7cbaf79dd4a901f7b968fba5b031e6b69ff7ee..71ff65ba95c45be5470d77fa4a0e085c4ff3cc0f 100755 (executable)
@@ -153,7 +153,7 @@ START_SERVER()
   starth=`date | cut -f 2 -d :`
   starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
 
-  while true
+  for i in $(seq 1 10)
     do
       sleep 6
       if (netstat -an | grep "$PORT" | grep LISTEN > /dev/null)
@@ -161,19 +161,9 @@ START_SERVER()
          ECHO "Virtuoso server started"
          return 0
        fi
-      nowh=`date | cut -f 2 -d :`
-      nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-      nowh=`expr $nowh - $starth`
-      nows=`expr $nows - $starts`
-
-      nows=`expr $nows + $nowh \*  60`
-      if test $nows -ge $timeout
-        then
+  done
          ECHO "***WARNING: Could not start Virtuoso DEMO Server within $timeout seconds"
          return 1
-       fi
-  done
 }
 
 STOP_SERVER()
index e54eb765b3520bb9d57619932500fbaabf282147..5935b728d625304b9b67d2fd14f0b0891273e39e 100755 (executable)
@@ -174,7 +174,7 @@ START_SERVER()
        starth=`date | cut -f 2 -d :`
        starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
 
-       while true
+       for i in $(seq 1 10)
        do
            sleep 6
            if (netstat -an | grep "$PORT" | grep LISTEN > /dev/null)
@@ -182,19 +182,9 @@ START_SERVER()
                ECHO "Virtuoso server started"
                return 0
            fi
-           nowh=`date | cut -f 2 -d :`
-           nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-           nowh=`expr $nowh - $starth`
-           nows=`expr $nows - $starts`
-
-           nows=`expr $nows + $nowh \*  60`
-           if test $nows -ge $timeout
-           then
+       done
                ECHO "***WARNING: Could not start Virtuoso DOC Server within $timeout seconds"
                return 1
-           fi
-       done
    fi
 }
 
index 3529c907043224914bed9f3fc40cc994b6c1355d..bf7cec76830e1f27a26ca3ac075b000e85972e0b 100755 (executable)
@@ -123,7 +123,7 @@ virtuoso_start() {
     fi
 
     stat="true"
-    while true
+    for i in $(seq 1 15)
     do
        sleep 4
        echo "Waiting $SERVER start on port $PORT..."
@@ -134,17 +134,9 @@ virtuoso_start() {
            LOG "PASSED: $SERVER successfully started on port $PORT"
            return 0
        fi
-       nowh=`date | cut -f 2 -d :`
-       nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-       nowh=`expr $nowh - $starth`
-       nows=`expr $nows - $starts`
-       nows=`expr $nows + $nowh \*  60`
-       if test $nows -ge $timeout
-       then
+    done
            LOG "***WARNING: Could not start $SERVER within $timeout seconds"
            return 1
-       fi
-    done
 }
 
 
index edcf6a9868073d04d14856198da5c9928a0b8388..e59a4fb2bef44f17103c56d1234d80f525ddd63e 100755 (executable)
@@ -104,7 +104,7 @@ START_SERVER()
   starth=`date | cut -f 2 -d :`
   starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
 
-  while true 
+  for i in $(seq 1 10) 
     do
       sleep 6
       if (netstat -an | grep "$PORT" | grep LISTEN > /dev/null) 
@@ -112,19 +112,9 @@ START_SERVER()
          ECHO "Virtuoso server started"     
          return 0
        fi
-      nowh=`date | cut -f 2 -d :`
-      nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-      nowh=`expr $nowh - $starth`
-      nows=`expr $nows - $starts`
-
-      nows=`expr $nows + $nowh \*  60`
-      if test $nows -ge $timeout 
-        then
+  done
          ECHO "***WARNING: Could not start Virtuoso DEMO Server within $timeout seconds"
          return 1
-       fi
-  done
 }
 
 STOP_SERVER()
index 1cf39814e8bcadfc5dd9f4a49f25c9e5c4d12177..a529a7207581d313fc392692be517c4c26755634 100755 (executable)
@@ -104,7 +104,7 @@ START_SERVER()
   starth=`date | cut -f 2 -d :`
   starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
 
-  while true 
+  for i in $(seq 1 10) 
     do
       sleep 6
       if (netstat -an | grep "$PORT" | grep LISTEN > /dev/null) 
@@ -112,19 +112,9 @@ START_SERVER()
          ECHO "Virtuoso server started"     
          return 0
        fi
-      nowh=`date | cut -f 2 -d :`
-      nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-      nowh=`expr $nowh - $starth`
-      nows=`expr $nows - $starts`
-
-      nows=`expr $nows + $nowh \*  60`
-      if test $nows -ge $timeout 
-        then
+  done
          ECHO "***WARNING: Could not start Virtuoso DEMO Server within $timeout seconds"
          return 1
-       fi
-  done
 }
 
 STOP_SERVER()
index 7e93ec7abde07d2aed054f761c91d24982c6a3e0..9a37beffa768af53e31b525c0fa6326e82ed2698 100755 (executable)
@@ -113,7 +113,7 @@ virtuoso_start() {
       virtuoso +wait
   fi
   stat="true"
-  while true 
+  for i in $(seq 1 15) 
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -124,17 +124,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 2f9e46e98b4145d0b8680845f7a1f0cf5b3fe92a..3ff0e2e7452de8e1293425362f713cfc7cfcd8ed 100755 (executable)
@@ -136,7 +136,7 @@ START_SERVER()
              rm $LOCKFILE
           fi
        RUN $SERVER +foreground $* &
-       while true
+       for i in $(seq 1 12)
        do
             sleep 5
            stat=`netstat -an | grep "[\.\:]$port " | grep LISTEN`
@@ -145,19 +145,9 @@ START_SERVER()
                LOG "PASSED: Virtuoso Server successfully started on port $port"
                return 0
            fi
-           nowh=`date | cut -f 2 -d :`
-           nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-           nowh=`expr $nowh - $starth`
-           nows=`expr $nows - $starts`
-
-           nows=`expr $nows + $nowh \*  60`
-           if test $nows -ge $timeout
-           then
+       done
                LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
                return 1
-           fi
-       done
 }
 echo "STARTED : thook.sh"
 echo "STARTED : thook.sh" > $OUTPUT
index c1d92310796ac8f25d401b8bca4fa720d20fa5ff..2ba37459c259c92ab26f96594baab3447ad645e8 100755 (executable)
@@ -316,7 +316,7 @@ START_SERVER()
        then
            return
        fi
-       while true
+       for i in $(seq 1 120)
        do
            stat=`netstat -an | grep "[\.\:]$port " | grep LISTEN`
            if [ "z$stat" != "z" ]
@@ -325,25 +325,15 @@ START_SERVER()
                return 0
            fi
             sleep 1
-           nowh=`date | cut -f 2 -d :`
-           nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-           nowh=`expr $nowh - $starth`
-           nows=`expr $nows - $starts`
-
-           nows=`expr $nows + $nowh \*  60`
-           if test $nows -ge $timeout
-           then
+       done
                LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
                return 1
-           fi
-       done
 }
 
 CHECK_PORT()
 {
   port=$1
-  while true
+  for i in $(seq 1 60)
   do
     stat=`netstat -an | grep "[\.\:]$port " | grep LISTEN`
     if [ "z$stat" = "z" ]
@@ -352,19 +342,9 @@ CHECK_PORT()
        return 0
     fi
     sleep 1
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done  
        LOG "***FAILED: Port $port is not freed during $timeout seconds"
        exit 1
-    fi
-  done  
 }
 
 STOP_SERVER()
index 8cde0467f2b3522e0b153e2c284774f11b410b78..f4415502e168b5d2acc0f43955ef5f6b1e579200 100755 (executable)
@@ -207,7 +207,7 @@ START_SERVER ()
       rm -f *.lck
       $SERVER +foreground -c tpcd.ini $* 1>/dev/null & 
       stat="true"
-      while true 
+      for i in $(seq 1 15) 
        do
          sleep 4
              stat=`netstat -an | grep "[\.\:]$PORT " | grep LISTEN` 
index 731597e8a80c33d9932e3ddc2d1724f0bf681625..a78ac6293f3c13d3309303b8ee5bc05a13747318 100755 (executable)
@@ -113,7 +113,7 @@ virtuoso_start() {
       "$SERVER" +wait
       fi
   stat="true"
-  while true
+  for i in $(seq 1 15)
   do
     sleep 4
     echo "Waiting $SERVER start on port $PORT..."
@@ -124,17 +124,9 @@ virtuoso_start() {
       LOG "PASSED: $SERVER successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start $SERVER within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 6a3da3f730636568b41e9b29d0ee7f45f289b175..97ab6905ab361a3e03e5295123dd42cf86294d46 100755 (executable)
@@ -79,7 +79,7 @@ virtuoso_start() {
          virtuoso +wait
   fi
   stat="true"
-  while true 
+  for i in $(seq 1 15) 
   do
     sleep 4
     echo "Waiting Virtuoso Server start on port $PORT..."
@@ -90,17 +90,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command_safe () {
index 84ebe5d39ad96773af8ac743c7aa06e8b6287da4..eb6afabab5aba1cab8ec4b9130858a8b0674cd59 100755 (executable)
@@ -48,7 +48,7 @@ virtuoso_start() {
   rm -f *.lck
   $SERVER
   stat="true"
-  while true 
+  for i in $(seq 1 15) 
   do
     sleep 4
     LOG "CHECKING: Is Virtuoso Server successfully started on port $PORT?"
@@ -59,17 +59,9 @@ virtuoso_start() {
       LOG "PASSED: Virtuoso Server successfully started on port $PORT"
       return 0
     fi
-    nowh=`date | cut -f 2 -d :`
-    nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-    nowh=`expr $nowh - $starth`
-    nows=`expr $nows - $starts`
-    nows=`expr $nows + $nowh \*  60`
-    if test $nows -ge $timeout
-    then
+  done
       LOG "***WARNING: Could not start Virtuoso Server within $timeout seconds"
       return 1
-    fi
-  done
 }
 
 do_command() {
index 7c17aee74e5cc1bdbde1787196c9cb2f9429fb24..96773636691f6615813f5bb74ddcae1c9779d645 100755 (executable)
@@ -161,7 +161,7 @@ START_SERVER()
   starth=`date | cut -f 2 -d :`
   starts=`date | cut -f 3 -d :|cut -f 1 -d " "`
 
-  while true
+  for i in $(seq 1 10)
     do
       sleep 6
       if (netstat -an | grep "$PORT" | grep LISTEN > /dev/null)
@@ -169,19 +169,9 @@ START_SERVER()
     ECHO "Virtuoso server started"
     return 0
   fi
-      nowh=`date | cut -f 2 -d :`
-      nows=`date | cut -f 3 -d : | cut -f 1 -d " "`
-
-      nowh=`expr $nowh - $starth`
-      nows=`expr $nows - $starts`
-
-      nows=`expr $nows + $nowh \*  60`
-      if test $nows -ge $timeout
-        then
+  done
     ECHO "***WARNING: Could not start Virtuoso Server within $timeout seconds"
     return 1
-  fi
-  done
 }
 
 STOP_SERVER()