[80335] trunk/base

jmr at macports.org jmr at macports.org
Sat Jul 9 01:41:59 PDT 2011


Revision: 80335
          http://trac.macports.org/changeset/80335
Author:   jmr at macports.org
Date:     2011-07-09 01:41:57 -0700 (Sat, 09 Jul 2011)
Log Message:
-----------
fix checking for existence of group on 10.5 (#30096)

Modified Paths:
--------------
    trunk/base/Makefile.in
    trunk/base/portmgr/dmg/postflight

Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in	2011-07-09 07:00:08 UTC (rev 80334)
+++ trunk/base/Makefile.in	2011-07-09 08:41:57 UTC (rev 80335)
@@ -39,7 +39,7 @@
 ifeq ($(DESTDIR),)
 # 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 ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then \
             if test `id -u` -eq 0; then \
                 echo "Creating group \"${RUNUSR}\"" ; \
                 ${DSEDITGROUP} -q -o create -n . ${RUNUSR} ; \

Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight	2011-07-09 07:00:08 UTC (rev 80334)
+++ trunk/base/portmgr/dmg/postflight	2011-07-09 08:41:57 UTC (rev 80335)
@@ -136,13 +136,13 @@
 # create the user to use for privilege dropping
 function create_run_user {
     DSEDITGROUP=/usr/sbin/dseditgroup
-    if ! ${DSEDITGROUP} -q -o read ${RUNUSR} > /dev/null 2>&1 ; then
+    if ! ${DSCL} -q . -read /Groups/${RUNUSR} > /dev/null 2>&1 ; then
         echo "Creating group \"${RUNUSR}\""
         ${DSEDITGROUP} -q -o create -n . ${RUNUSR}
     fi
     if ! ${DSCL} -q . -list /Users/${RUNUSR} > /dev/null 2>&1 ; then
         echo "Creating user \"${RUNUSR}\""
-        ${DSCL} -q . -create /Users/${RUNUSR} Password *
+        ${DSCL} -q . -create /Users/${RUNUSR} Password \*
         ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1))
         ${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $2}')
         ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory /var/empty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110709/268a88d2/attachment.html>


More information about the macports-changes mailing list