svn commit: r244825 - projects/portbuild/tools
Mark Linimon
linimon at FreeBSD.org
Sat Dec 29 17:41:51 UTC 2012
Author: linimon (doc,ports committer)
Date: Sat Dec 29 17:41:50 2012
New Revision: 244825
URL: http://svnweb.freebsd.org/changeset/base/244825
Log:
Teach this the right way of doing zfs delegation. While here, add the
loads/ subdirectory, and clean out cruft.
Modified:
projects/portbuild/tools/addarch
Modified: projects/portbuild/tools/addarch
==============================================================================
--- projects/portbuild/tools/addarch Sat Dec 29 16:33:32 2012 (r244824)
+++ projects/portbuild/tools/addarch Sat Dec 29 17:41:50 2012 (r244825)
@@ -58,34 +58,23 @@ else
gid=${uid}
fi
-# create arch-specific directory if it does not already exist.
-# Exit if it is not manageable by uid:gid.
-archdir=${pbd}/${arch}
-if [ ! -d ${archdir} ]; then
- echo "The ${archdir} directory does not exist. I'll create it for you."
- mkdir -p ${archdir} || exit 1
- chown -R ${uid}:${gid} ${archdir} || exit 1
- chmod 775 ${archdir} || exit 1
-fi
-
# create zfs instance for arch if it does not already exist. (duplicates 'build')
+archdir=${pbd}/${arch}
archfs=${ZFS_VOLUME}/portbuild/${arch}
-mountpoint=$(realpath ${archdir})
if ! test_fs "${archfs}"; then
echo "The ${archfs} filesystem does not exist. I'll create and mount it for you."
- zfs create -o mountpoint=${mountpoint} ${archfs} || exit 1
+ zfs create ${archfs} || exit 1
chown -R ${uid}:${gid} ${archdir} || exit 1
chmod -R g+w ${archdir} || exit 1
fi
-## create .ssh/ directory if it does not already exist. (duplicates 'build')
-#sshdir=${archdir}/.ssh
-#if [ ! -d ${sshdir} ]; then
-# echo "The ${sshdir} directory does not exist. I'll create it for you, but you will need to populate it."
-# mkdir -p ${sshdir} || exit 1
-# chown -R ${uid}:${gid} ${sshdir} || exit 1
-# chmod 700 ${sshdir} || exit 1
-#fi
+loads=${archdir}/loads
+if [ ! -d ${loads} ]; then
+ echo "The ${loads} directory does not exist. I'll create it for you."
+ mkdir -p ${loads} || exit 1
+ chown -R ${uid}:${gid} ${loads} || exit 1
+ chmod -R g+w ${loads} || exit 1
+fi
lockfiles=${archdir}/lockfiles
if [ ! -d ${lockfiles} ]; then
More information about the svn-src-projects
mailing list