safer-timeout
authorDebian Krap Maintainers <debian-qt-kde@lists.debian.org>
Wed, 17 Apr 2013 19:30:26 +0000 (19:30 +0000)
committerDebian Krap Maintainers <debian-qt-kde@lists.debian.org>
Wed, 17 Apr 2013 19:30:26 +0000 (19:30 +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 a4cf3ef9f3f1b8ee2e1d1bba88a43df5e3b9fea8..cfae5debf96c28e2f0caacbdf2e61e884b68dd8e 100755 (executable)
@@ -102,7 +102,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..."
@@ -113,17 +113,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 fe3224f2b5c947f188491455b1b6c09bd58f9f34..66eb5cad0fb717f59bc838d903111d5560256ba4 100755 (executable)
@@ -121,7 +121,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..."
@@ -132,17 +132,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 17920ca43571125904c5c81381d6b59989871927..a8bfbf57afebb3b376c713428352e0d5b31fc13e 100755 (executable)
@@ -106,7 +106,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..."
@@ -117,17 +117,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 0d4056349127c30acbae6c29ae103738057a7623..addb930bc8a7d2447e605e84f388c0590692525c 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 d6bb589515e1bc52a0e09b621502c203a71af415..3fe0c0114236ad8dbe476af98c08fbd66b13956a 100755 (executable)
@@ -105,7 +105,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..."
@@ -116,17 +116,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 bd7268dbd758b7fc94cbf883004428d0b86b6b4a..8fa550910951fd046ef305bfd883184a5b84130e 100755 (executable)
@@ -109,7 +109,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..."
@@ -120,17 +120,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 c7b7ac4bfe843a0185aa751daaf2494ec9adbbb9..fad6c536108019634fa65ce2c6ed0d5e221b52e6 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 511132647e8018c43e0dba273d783ee7deff8e14..1bc2ae2c93f063a6ea1d594d705cc3e49a8be33f 100755 (executable)
@@ -105,7 +105,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..."
@@ -116,17 +116,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 2aeb400557cbdb879928c4bd4f1f2569a014db34..54046445f1d9d147873fffd87e5c6fff5b73b793 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 c7ba674431042bbf8a3f2a8a3756c9510997a4a5..e97a7b0a27109aa797eba8ea46900886bbdd01e2 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 310b414d9d9ae91cf1fbc7741f44e51b163145d6..b5ee9a4ff5f291be912a94a5daf89b00890b4bc8 100755 (executable)
@@ -109,7 +109,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..."
@@ -120,17 +120,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 193784ee49ff1d4046b7914ab52cd3696d7ec759..b2026801cfe90e216761375d9c24b93c076973d6 100755 (executable)
@@ -104,7 +104,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..."
@@ -115,17 +115,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 adb11e7b8c83a8842b3d3d7a14ab5a16f668d658..01d79a84459c6703385d6f43f4d5ec598925b202 100755 (executable)
@@ -105,7 +105,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..."
@@ -116,17 +116,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 e51462443fe548b7b5a80c6b091ad44a2beeee7a..80113035f910cba56c86f8c5089b4c911dd2a2dc 100755 (executable)
@@ -140,7 +140,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..."
@@ -151,17 +151,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 d943dfeba26a94edb478ff6adb81abefe773b606..a8ccba56b5e14804516dbd552efb961f4cf4572d 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 28254ebd59eff72cec3ddb503f94faaf854a0297..b793b24b348551ada70f60679bf612a6eef90ed9 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 7bf3d1b8bdeb7bc3c82ea6e2581af8a91cc220cb..a071aad5c8161b4431be1e4c3da2386a554d0471 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 f5da6f6fab524d59679edd6914487ba8998f3322..e0865601d76dcf01e2801278b4150c68efce1c7b 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 77fe90391c408db59a48a729c65f9f5cd551fb35..9129ddf0399837963eda2a2ae2e70c6eff6007d6 100755 (executable)
@@ -258,7 +258,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..."
@@ -269,17 +269,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 7854c894334990c69ea96e1563a08706875a6ef9..32b150bdaec4a81da38c1c06e1f8deca1ca7166c 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 748129f1b9ae1133ac238d866277a467fbafbda7..21ed4824593539a863adefc2cd97955acc745d58 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 3974bea92fa13244eab2440c001a588386575055..4c44c2c28fde6c241bde5c0b249589c7db99b14e 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 fc5e37364391f65868803231194505960175a0c1..fc6327ab9d87d87b3a490f0cbe3325b69d09cd62 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 7a08ddec4cf608ddae81e09594d2b855d39d561e..9dbd5d6a37d6d7fe63fcc309cd2dd77d1d2efacd 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 62758bcb1e396232fb973717f5d2afb4b6a176f3..db1e0ffda29d8ac29094d5d0509172ec11ab62e5 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 9b51134c74db3cd64a3f5d480cecc958d04f70e5..7ead91c564519b1fcc46d6d61df760c06d8167e9 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 688cb5f0b895c585073c9d430f70906dd7e5990f..e8b76d66ebcdeacf08aa580105b7795b34e4dfc0 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 040e7ff96d56f0e99bd227814956bdc2ec1d0e08..1b52c3350f077c777ae618cb8e9be01502c1d527 100755 (executable)
@@ -315,7 +315,7 @@ START_SERVER()
        then
            return
        fi
-       while true
+       for i in $(seq 1 60)
        do
            stat=`netstat -an | grep "[\.\:]$port " | grep LISTEN`
            if [ "z$stat" != "z" ]
@@ -324,25 +324,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" ]
@@ -351,19 +341,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 95e4143b3d66fc7cfe57520a4ab23e6887655386..8636f9380fb5aa7c19d63e7f8e4d8c7d745f565b 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 e2e75aae0d568e95d590a36328bd2aa932cdf4a4..d04d6ae2533aafdb6ad734e1443fbc1e6d7f667f 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 55e329a203eff8d20cfb3778fb1fd33c6bb602c7..dab350159f5316808a154e28fa03dae2f3c54d95 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 d3d5239a2399d047b52f35210594e5bdf7fcd2ee..051668380c79a9f6584c5b79ed7f68cf91993053 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 5c5144e9d32c4e383f33751fda1ec381a9ba9fd7..c022158a265831cfab4d4b6b891896330e7ea59e 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()