From owner-svn-src-projects@FreeBSD.ORG Sun Dec 30 00:45:43 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5451B800; Sun, 30 Dec 2012 00:45:43 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38E168FC08; Sun, 30 Dec 2012 00:45:43 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU0jhmv084328; Sun, 30 Dec 2012 00:45:43 GMT (envelope-from linimon@svn.freebsd.org) Received: (from linimon@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU0jhFW084327; Sun, 30 Dec 2012 00:45:43 GMT (envelope-from linimon@svn.freebsd.org) Message-Id: <201212300045.qBU0jhFW084327@svn.freebsd.org> From: Mark Linimon Date: Sun, 30 Dec 2012 00:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244844 - projects/portbuild/tools X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 00:45:43 -0000 Author: linimon (doc,ports committer) Date: Sun Dec 30 00:45:42 2012 New Revision: 244844 URL: http://svnweb.freebsd.org/changeset/base/244844 Log: Make this create a couple of directories. This is part of the removal of running things as root, which has access to /var/run. Modified: projects/portbuild/tools/mkportbuild Modified: projects/portbuild/tools/mkportbuild ============================================================================== --- projects/portbuild/tools/mkportbuild Sun Dec 30 00:28:50 2012 (r244843) +++ projects/portbuild/tools/mkportbuild Sun Dec 30 00:45:42 2012 (r244844) @@ -88,4 +88,14 @@ fi echo "checking out the repository ..." su -m ${PORTBUILD_USER} -c "${VCS_CHECKOUT_COMMAND} ${VCS_PORTBUILD_REPOSITORY} ${ZFS_MOUNTPOINT}/portbuild" || exit 1 -echo "$0: done. You should now be able to edit files in ${ZFS_MOUNTPOINT}/portbuild/conf." +echo "$0: you should now be able to edit files in ${ZFS_MOUNTPOINT}/portbuild/conf." + +# create convenience directories. failure is annoying but non-fatal. +extra_dirs="lockfiles log" +for extra_dir in ${extra_dirs}; do + if [ ! -d ${ZFS_MOUNTPOINT}/portbuild/${extra_dir} ]; then + su -m ${PORTBUILD_USER} -c "mkdir ${ZFS_MOUNTPOINT}/portbuild/${extra_dir}" + fi +done + +echo "$0: done."