mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-15 11:20:26 +00:00
Made scripts more portable (run on SunOS 5.6 now). [from HEAD]
This commit is contained in:
parent
f04a2ce2b4
commit
cd7d28d743
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ngIRCd Test Suite
|
# ngIRCd Test Suite
|
||||||
# $Id: getpid.sh,v 1.2 2002/11/10 14:28:06 alex Exp $
|
# $Id: getpid.sh,v 1.2.4.1 2003/04/22 20:01:23 alex Exp $
|
||||||
|
|
||||||
# wurde ein Name uebergeben?
|
# wurde ein Name uebergeben?
|
||||||
[ $# -ne 1 ] && exit 1
|
[ $# -ne 1 ] && exit 1
|
||||||
@ -18,7 +18,9 @@ fi
|
|||||||
|
|
||||||
# PID ermitteln
|
# PID ermitteln
|
||||||
ps $PS_FLAGS > procs.tmp
|
ps $PS_FLAGS > procs.tmp
|
||||||
pid=$( cat procs.tmp | grep "$1" | awk "{print \$$PS_PIDCOL}" | sort -n | head $HEAD_FLAGS )
|
cat procs.tmp | grep "$1" | awk "{print \$$PS_PIDCOL}" | sort -n > pids.tmp
|
||||||
|
pid=`head $HEAD_FLAGS pids.tmp`
|
||||||
|
rm -rf procs.tmp pids.tmp
|
||||||
|
|
||||||
# ermittelte PID validieren
|
# ermittelte PID validieren
|
||||||
[ "$pid" -gt 1 ] > /dev/null 2>&1
|
[ "$pid" -gt 1 ] > /dev/null 2>&1
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ngIRCd Test Suite
|
# ngIRCd Test Suite
|
||||||
# $Id: stress-server.sh,v 1.6 2002/09/23 22:07:43 alex Exp $
|
# $Id: stress-server.sh,v 1.6.4.1 2003/04/22 20:01:23 alex Exp $
|
||||||
|
|
||||||
[ -z "$srcdir" ] && srcdir=`dirname $0`
|
[ -z "$srcdir" ] && srcdir=`dirname $0`
|
||||||
|
|
||||||
[ $1 -gt 0 ] 2> /dev/null && CLIENTS=$1 || CLIENTS=5
|
[ "$1" -gt 0 ] 2> /dev/null && CLIENTS="$1" || CLIENTS=5
|
||||||
|
|
||||||
name=`basename $0`
|
name=`basename $0`
|
||||||
test=`echo ${name} | cut -d '.' -f 1`
|
test=`echo ${name} | cut -d '.' -f 1`
|
||||||
|
Loading…
Reference in New Issue
Block a user