From: Wayne Davison Date: Sun, 20 Feb 2005 16:27:10 +0000 (+0000) Subject: Improved the testuser-setting code to try to get it to work X-Git-Tag: v2.6.4pre1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19cb6106d25ea13cc394637206147c8fb51ffdff;p=thirdparty%2Frsync.git Improved the testuser-setting code to try to get it to work under solaris. --- diff --git a/runtests.sh b/runtests.sh index f5655e79..7b0654df 100755 --- a/runtests.sh +++ b/runtests.sh @@ -142,7 +142,13 @@ echo "$0 running in `pwd`" echo " rsync_bin=$rsync_bin" echo " srcdir=$srcdir" -testuser=`id -un || whoami || echo UNKNOWN` +if test -e /usr/bin/whoami; then + testuser=`/usr/bin/whoami` +elif test -e /usr/ucb/whoami; then + testuser=`/usr/ucb/whoami` +else + testuser=`id -un || whoami || echo UNKNOWN` +fi echo " testuser=$testuser" echo " os=`uname -a`"