[79692] trunk/base/Makefile.in

jmr at macports.org jmr at macports.org
Thu Jun 23 10:31:40 PDT 2011


Revision: 79692
          http://trac.macports.org/changeset/79692
Author:   jmr at macports.org
Date:     2011-06-23 10:31:40 -0700 (Thu, 23 Jun 2011)
Log Message:
-----------
use 'id -u' in Makefile to check if we're root, rather than $USER

Modified Paths:
--------------
    trunk/base/Makefile.in

Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in	2011-06-23 17:29:23 UTC (rev 79691)
+++ trunk/base/Makefile.in	2011-06-23 17:31:40 UTC (rev 79692)
@@ -40,7 +40,7 @@
 # create run user if it doesn't exist
 	@if test -n "${DSCL}" -a -n "${DSEDITGROUP}" ; then \
         if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then \
-            if test $$USER = root; then \
+            if test `id -u` -eq 0; then \
                 echo "Creating group \"${RUNUSR}\"" ; \
                 ${DSEDITGROUP} -q -o create -n . ${RUNUSR} ; \
             else \
@@ -48,7 +48,7 @@
             fi ; \
         fi ; \
         if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then \
-            if test $$USER = root; then \
+            if test `id -u` -eq 0; then \
                 echo "Creating user \"${RUNUSR}\"" ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
                 ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $$(($$(${DSCL} -q . -list /Users UniqueID | /usr/bin/awk '{print $$2}' | sort -ug | tail -1)+1)) ; \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110623/92fbebc2/attachment-0001.html>


More information about the macports-changes mailing list