=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/install-sh,v retrieving revision 1.3.6.1 retrieving revision 1.4 diff -u -r1.3.6.1 -r1.4 --- src/usr.bin/sudo/Attic/install-sh 2002/01/18 16:14:46 1.3.6.1 +++ src/usr.bin/sudo/Attic/install-sh 2002/01/03 03:49:16 1.4 @@ -1,7 +1,7 @@ #! /bin/sh ## (From INN-1.4, written by Rich Salz) -## $Revision: 1.3.6.1 $ +## $Revision: 1.4 $ ## A script to install files and directories. PROGNAME=`basename $0` @@ -16,7 +16,7 @@ MV=mv RM=rm STRIP=strip -WHOAMI="echo root" +WHOAMI=whoami ## Some systems don't support -x, so we have to use -f. for d in /sbin /etc /usr/sbin /usr/etc; do @@ -26,16 +26,17 @@ fi done -for d in /usr/bin /bin /usr/ucb /usr/bsd; do +for d in /usr/bin /usr/ucb /usr/bsd; do if [ -f $d/whoami ]; then WHOAMI=${d}/whoami break - elif [ -f $d/id ]; then - WHOAMI=${d}/id | sed -n 's/^[^(]*(\([^)]*\)).*/\1/p' fi done +if [ X"$WHOAMI" = X"" ]; then + WHOAMI=id | sed -n 's/^[^(]*(\([^)]*\)).*/\1/p' +fi -for d in /usr/ccs/bin /usr/bin /bin; do +for d in /usr/ccs/bin /usr/bin; do if [ -f $d/strip ]; then STRIP=${d}/strip break