summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
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