Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2012 17:41:51 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r244825 - projects/portbuild/tools
Message-ID:  <201212291741.qBTHfpxh017341@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212291741.qBTHfpxh017341>