From owner-freebsd-ports@FreeBSD.ORG Thu Feb 13 22:20:19 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0930A406; Thu, 13 Feb 2014 22:20:19 +0000 (UTC) Received: from dub0-omc3-s36.dub0.hotmail.com (dub0-omc3-s36.dub0.hotmail.com [157.55.2.45]) by mx1.freebsd.org (Postfix) with ESMTP id A06771A44; Thu, 13 Feb 2014 22:20:18 +0000 (UTC) Received: from DUB129-W68 ([157.55.2.9]) by dub0-omc3-s36.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Feb 2014 14:19:10 -0800 X-TMN: [4zOAXZt6xOf8lmDohiUjMnh4kQwXjUQ/] X-Originating-Email: [andrew.hotlab@hotmail.com] Message-ID: From: Andrew Hotlab To: "bdrewery@FreeBSD.org" Subject: [patch] sysutils/beadm Date: Thu, 13 Feb 2014 23:19:10 +0100 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 13 Feb 2014 22:19:10.0753 (UTC) FILETIME=[9E7DE910:01CF2909] Cc: "ports@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 22:20:19 -0000 First of all=2C thank you very much for the good work with this port. I'm s= ure it's changing the life of a lot FreeBSD system administrators!=0A= =0A= In my setup I have the following layout (several datasets for /usr=2C /var= =2C etc.):=0A= =0A= NAME =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 USED =A0AVAIL =A0REFER =A0MOUNTPOI= NT=0A= sys =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1.55G =A018.0G =A0 =A031K =A0none= =0A= sys/ROOT =A0 =A0 =A0 =A0 =A0 =A0 =A0 532M =A018.0G =A0 =A031K =A0none=0A= sys/ROOT/default =A0 =A0 =A0 114K =A018.0G =A0 250M =A0/=0A= sys/ROOT/default/tmp =A0 =A022K =A018.0G =A0 =A038K =A0/tmp=0A= sys/ROOT/default/usr =A0 =A0 1K =A018.0G =A0 245M =A0/usr=0A= sys/ROOT/default/var =A048.5K =A018.0G =A036.4M =A0/var=0A= sys/swap =A0 =A0 =A0 =A0 =A0 =A0 =A01.03G =A019.0G =A0 =A016K =A0-=0A= =0A= At this moment the utility does not seems to be able to manage this scheme= =2C since it sets the mountpoint property as "legacy" for all datasets unde= r the root=2C thus preventing to automatically mount any subdirectory at bo= ot.=0A= I've tested this simple solution (to let do the job to the canmount propert= y)=2C and it seems to solve the problem without affecting the behavior when= all system folders are located under a single root dataset (please see the= patch below).=A0I'd be glad if you'll include it in the next port revision= .=0A= =0A= I'm at your disposal for any further detail.=0A= =0A= Best regards.=0A= =0A= Andrew=0A= =0A= =0A= --- ./beadm 2014-01-11 17:08:31.112384992 +0100=0A= +++ /usr/local/sbin/beadm 2014-01-11 17:06:38.620706860 +0100=0A= @@ -505=2C7 +505=2C7 @@=0A= if [ ${MOUNT} -eq 0 ]=0A= then=0A= zfs umount ${POOL}/${BEDS}/${2}=0A= - zfs set mountpoint=3Dlegacy ${POOL}/${BEDS}/${2}=0A= + zfs set mountpoint=3D/ ${POOL}/${BEDS}/${2}=0A= fi=0A= fi=0A= if ! zpool set bootfs=3D${POOL}/${BEDS}/${2} ${POOL} 1> /dev/null 2> /dev/n= ull=0A= @@ -518=2C6 +518=2C7 @@=0A= ZFS_LIST=3D$( zfs list -H -o name -r ${POOL}/${BEDS} )=0A= # disable automatic mount on all inactive boot environments=0A= echo "${ZFS_LIST}" \=0A= + | grep -v "^${POOL}/${BEDS}$" \=0A= | grep -v "^${POOL}/${BEDS}/${2}$" \=0A= | grep -v "^${POOL}/${BEDS}/${2}/" \=0A= | while read NAME =