Commit Diff


commit - 66b461a5ab2a67a9cf9b152b21c9335fda795f42
commit + 508fa48aa6342beb50e510285b683abe54e0fe92
blob - 9413ba569060ecd106854ff9bc5d7c38bda6e284
blob + 8b1550395b95839f4a6541efd57ccb81d88ce39e
--- src/testsuite/start-server.sh
+++ src/testsuite/start-server.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: start-server.sh,v 1.4 2002/09/13 06:04:49 alex Exp $
+# $Id: start-server.sh,v 1.5 2002/09/16 09:53:16 alex Exp $
 
 echo "      starting server ..."
 
@@ -11,8 +11,12 @@ echo "This is an ngIRCd Test Server" > ngircd-test.mot
 ./ngircd-TEST -np -f ${srcdir}/ngircd-test.conf > ngircd-test.log 2>&1 &
 sleep 1
 
-ps ax > procs.tmp
-pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$1 }"`
+PS_FLAGS=a; PS_PIDCOL=1
+ps a > /dev/null 2>&1
+if [ $? -ne 0 ]; then PS_FLAGS=-f; PS_PIDCOL=2; fi
+
+ps $PS_FLAGS > procs.tmp
+pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
 kill -0 $pid > /dev/null 2>&1
 
 # -eof-
blob - b649c9c9d0ec5ff1d2f07af17b3aaec1d93b20c1
blob + af28bae1b567d40ad2073f23824f6b6b8dced88b
--- src/testsuite/stop-server.sh
+++ src/testsuite/stop-server.sh
@@ -1,11 +1,15 @@
 #!/bin/sh
 # ngIRCd Test Suite
-# $Id: stop-server.sh,v 1.3 2002/09/13 06:04:49 alex Exp $
+# $Id: stop-server.sh,v 1.4 2002/09/16 09:53:16 alex Exp $
 
 echo "      stopping server ..."
 
-ps ax > procs.tmp
-pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$1 }"`
+PS_FLAGS=a; PS_PIDCOL=1
+ps a > /dev/null 2>&1
+if [ $? -ne 0 ]; then PS_FLAGS=-f; PS_PIDCOL=2; fi
+
+ps $PS_FLAGS > procs.tmp
+pid=`cat procs.tmp | grep ngircd-TEST | awk "{ print \\\$$PS_PIDCOL }"`
 kill $pid > /dev/null 2>&1
 
 # -eof-