[90002] trunk/base
jmr at macports.org
jmr at macports.org
Sun Feb 19 09:25:27 PST 2012
Revision: 90002
http://trac.macports.org/changeset/90002
Author: jmr at macports.org
Date: 2012-02-19 09:25:25 -0800 (Sun, 19 Feb 2012)
Log Message:
-----------
update home dir for $RUNUSR in postflight script, use localstatedir variable
Modified Paths:
--------------
trunk/base/Makefile.in
trunk/base/portmgr/dmg/postflight
Modified: trunk/base/Makefile.in
===================================================================
--- trunk/base/Makefile.in 2012-02-19 15:30:32 UTC (rev 90001)
+++ trunk/base/Makefile.in 2012-02-19 17:25:25 UTC (rev 90002)
@@ -64,7 +64,7 @@
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts ; \
${DSCL} -q . -create /Users/${RUNUSR} Password \* ; \
${DSCL} -q . -create /Users/${RUNUSR} PrimaryGroupID $$(${DSCL} -q . -read /Groups/${RUNUSR} PrimaryGroupID | /usr/bin/awk '{print $$2}') ; \
- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${prefix}/var/macports/home ; \
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${localstatedir}/macports/home ; \
${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false ; \
else \
echo "Not creating user \"${RUNUSR}\" (not root)" ; \
@@ -73,7 +73,7 @@
if test "$$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ; then \
if test `id -u` -eq 0; then \
echo "Updating home directory location for user \"${RUNUSR}\"" ; \
- ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${prefix}/var/macports/home ; \
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${localstatedir}/macports/home ; \
else \
echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
fi ; \
Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight 2012-02-19 15:30:32 UTC (rev 90001)
+++ trunk/base/portmgr/dmg/postflight 2012-02-19 17:25:25 UTC (rev 90002)
@@ -165,7 +165,7 @@
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
${DSCL} -q . -create /Users/${RUNUSR} Password \*
${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
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
${DSCL} -q . -create /Users/${RUNUSR} UserShell /usr/bin/false
fi
if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
@@ -176,6 +176,10 @@
${DSCL} -q . -create /Users/${RUNUSR} RealName MacPorts
fi
fi
+ if [[ "$(${DSCL} -q . -read /Users/${RUNUSR} NFSHomeDirectory)" = "NFSHomeDirectory: /var/empty" ]]; then
+ echo "Updating home directory location for user \"${RUNUSR}\""
+ ${DSCL} -q . -create /Users/${RUNUSR} NFSHomeDirectory ${PREFIX}/var/macports/home
+ fi
}
echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120219/40140e7e/attachment.html>
More information about the macports-changes
mailing list