Index: src/bin/ipcclean/ipcclean.sh
===================================================================
RCS file: /cvsroot/pgsql/src/bin/ipcclean/ipcclean.sh,v
retrieving revision 1.17
diff -c -c -r1.17 ipcclean.sh
*** src/bin/ipcclean/ipcclean.sh	3 Mar 2006 16:49:21 -0000	1.17
--- src/bin/ipcclean/ipcclean.sh	3 Mar 2006 21:49:05 -0000
***************
*** 19,26 ****
      exit 0
  fi
  
! # only check $LOGNAME if $USER is not set
! if [ "$USER" = 'root' -o \( ! "$USER" -a "$LOGNAME" = 'root' \) ]
  then
    (
      echo "$CMDNAME: cannot be run as root" 1>&2
--- 19,37 ----
      exit 0
  fi
  
! # test for running as root
! 
! ISROOT="N"
! if id -u >/dev/null 2>&1
! then	if [ `id -u` -eq 0 ]
! 	then	ISROOT="Y"
! 	fi
! elif	# only check $LOGNAME if $USER is not set
! 	[ "$USER" = 'root' -o \( ! "$USER" -a "$LOGNAME" = 'root' \) ]
! then	ISROOT="Y"
! fi
! 
! if [ "$ISROOT" = "Y" ]
  then
    (
      echo "$CMDNAME: cannot be run as root" 1>&2
