aboutsummaryrefslogtreecommitdiffstats
path: root/runtests.sh
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-20 21:04:03 +0000
committerWayne Davison <wayned@samba.org>2005-02-20 21:04:03 +0000
commit13d00101e808ebfc327f8c5e830b96303facf31f (patch)
tree34f0dfeb1cfa6cd85b264b142c560ca993e058f7 /runtests.sh
parent3e7934a5fb06dac717722c4d680d0c063dbf8d5f (diff)
downloadandroid_external_rsync-13d00101e808ebfc327f8c5e830b96303facf31f.tar.gz
android_external_rsync-13d00101e808ebfc327f8c5e830b96303facf31f.tar.bz2
android_external_rsync-13d00101e808ebfc327f8c5e830b96303facf31f.zip
One more tweak to the "whoami" code.
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtests.sh b/runtests.sh
index 85030d0b..c4c4137f 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -144,8 +144,10 @@ if [ -f /usr/bin/whoami ]; then
testuser=`/usr/bin/whoami`
elif [ -f /usr/ucb/whoami ]; then
testuser=`/usr/ucb/whoami`
+elif [ -f /bin/whoami ]; then
+ testuser=`/bin/whoami`
else
- testuser=`id -un || whoami || echo ${LOGNAME:-${USERNAME:-${USER:-'UNKNOWN'}}}`
+ testuser=`id -un 2>/dev/null || echo ${LOGNAME:-${USERNAME:-${USER:-'UNKNOWN'}}}`
fi
echo " testuser=$testuser"