Cope on systems without the whoami command.
authorMartin Pool <mbp@samba.org>
Fri, 22 Mar 2002 05:20:47 +0000 (05:20 +0000)
committerMartin Pool <mbp@samba.org>
Fri, 22 Mar 2002 05:20:47 +0000 (05:20 +0000)
runtests.sh

index 50f4c8b..397e1a0 100755 (executable)
@@ -139,12 +139,7 @@ echo "$0 running in `pwd`"
 echo "    rsync_bin=$rsync_bin"
 echo "    srcdir=$srcdir"
 
-if testuser=`whoami`
-then
-    :
-else 
-    testuser='(unknown)'
-fi
+testuser=`whoami || echo UNKNOWN`
 
 echo "    testuser=$testuser"
 echo "    os=`uname -a`"