summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2003-09-11 22:32:17 -0700
committerTim Rice <tim@multitalents.net>2003-09-11 22:32:17 -0700
commit23ee359b08fbdacc546ab84414eb9c63b6a2005d (patch)
tree09d6f1efe22fc009b5a689c86e1d3da8103fbf1a /regress/test-exec.sh
parentd546a84ef6e2569499d72ed4e1e918c073a7568e (diff)
[regress/agent-ptrace.sh regress/dynamic-forward.sh
regress/sftp-cmds.sh regress/stderr-after-eof.sh regress/test-exec.sh] no longer depends on which(1). patch by dtucker@
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r--regress/test-exec.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index b5ef3bc7c..cc7ea67fe 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -6,7 +6,7 @@ PORT=4242
6 6
7if [ -x /usr/ucb/whoami ]; then 7if [ -x /usr/ucb/whoami ]; then
8 USER=`/usr/ucb/whoami` 8 USER=`/usr/ucb/whoami`
9elif [ -x "`which whoami 2>&1`" ]; then 9elif whoami >/dev/null 2>&1; then
10 USER=`whoami` 10 USER=`whoami`
11else 11else
12 USER=`id -un` 12 USER=`id -un`
@@ -89,6 +89,21 @@ echon()
89 fi 89 fi
90} 90}
91 91
92have_prog()
93{
94 saved_IFS="$IFS"
95 IFS=":"
96 for i in $PATH
97 do
98 if [ -x $i/$1 ]; then
99 IFS="$saved_IFS"
100 return 0
101 fi
102 done
103 IFS="$saved_IFS"
104 return 1
105}
106
92cleanup () 107cleanup ()
93{ 108{
94 if [ -f $PIDFILE ]; then 109 if [ -f $PIDFILE ]; then