Date: Mon, 11 Feb 2013 14:45:42 +0000 (UTC) From: Mark Linimon <linimon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r246681 - projects/portbuild/admin/tools Message-ID: <201302111445.r1BEjgGq031423@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: linimon (doc,ports committer) Date: Mon Feb 11 14:45:41 2013 New Revision: 246681 URL: http://svnweb.freebsd.org/changeset/base/246681 Log: Fix the test for whether the portbuild zpool exists. While here, add some more armor-plating. Modified: projects/portbuild/admin/tools/newmkportbuild Modified: projects/portbuild/admin/tools/newmkportbuild ============================================================================== --- projects/portbuild/admin/tools/newmkportbuild Mon Feb 11 14:32:06 2013 (r246680) +++ projects/portbuild/admin/tools/newmkportbuild Mon Feb 11 14:45:41 2013 (r246681) @@ -27,10 +27,19 @@ if [ -z "${PORTBUILD_USER}" ]; then echo "You must export PORTBUILD_USER, for example, export PORTBUILD_USER=${DEFAULT_PORTBUILD_USER}." exit 1 fi +if [ ! `id ${PORTBUILD_USER} 2> /dev/null` ]; then + echo "User ${PORTBUILD_USER} must exist." + exit 1 +fi if [ -z "${SRCBUILD_USER}" ]; then echo "You must export SRCBUILD_USER, for example, export SRCBUILD_USER=${DEFAULT_SRCBUILD_USER}." exit 1 fi +if [ ! `id ${SRCBUILD_USER} 2> /dev/null` ]; then + echo "User ${SRCBUILD_USER} must exist." + exit 1 +fi + if [ -z "${VCS_CHECKOUT_COMMAND}" ]; then VCS_CHECKOUT_COMMAND="${DEFAULT_VCS_CHECKOUT_COMMAND}" fi @@ -74,7 +83,8 @@ fi # create a place to hold all portbuild-managed files. All other ZFS_VOLUME # files are managed by srcbuild. -if [ ! -d ${ZFS_MOUNTPOINT}/portbuild ]; then +name=`zfs list -H -t filesystem -o name ${ZFS_VOLUME}/portbuild` +if [ -z "${name}" ]; then echo "ZFS volume ${ZFS_VOLUME}/portbuild does not exist. I'll create it for you." zfs create ${ZFS_VOLUME}/portbuild || exit 1 fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302111445.r1BEjgGq031423>