svn commit: r459380 - in head/sysutils/beadm: . files
Bryan Drewery
bdrewery at FreeBSD.org
Thu Jan 18 21:12:31 UTC 2018
Author: bdrewery
Date: Thu Jan 18 21:12:29 2018
New Revision: 459380
URL: https://svnweb.freebsd.org/changeset/ports/459380
Log:
- Properly support selecting BE from boot menu.
This is only supported for releases that have /etc/rc.d/zfsbe, which is
10.4, 11.1, and newer.
PR: 208601
Reported by: many
Reviewed by: allanjude
Modified:
head/sysutils/beadm/Makefile
head/sysutils/beadm/files/patch-beadm
head/sysutils/beadm/files/patch-beadm.1
Modified: head/sysutils/beadm/Makefile
==============================================================================
--- head/sysutils/beadm/Makefile Thu Jan 18 21:08:02 2018 (r459379)
+++ head/sysutils/beadm/Makefile Thu Jan 18 21:12:29 2018 (r459380)
@@ -2,7 +2,7 @@
PORTNAME= beadm
PORTVERSION= 1.2.7
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= GH \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
Modified: head/sysutils/beadm/files/patch-beadm
==============================================================================
--- head/sysutils/beadm/files/patch-beadm Thu Jan 18 21:08:02 2018 (r459379)
+++ head/sysutils/beadm/files/patch-beadm Thu Jan 18 21:12:29 2018 (r459380)
@@ -1,5 +1,5 @@
---- beadm.orig 2017-01-13 15:25:44.000000000 -0800
-+++ beadm 2017-07-08 09:45:40.962588000 -0700
+--- beadm.orig 2017-01-13 23:25:44 UTC
++++ beadm
@@ -128,6 +128,24 @@ __be_new() { # 1=SOURCE 2=TARGET
unset NAME_NEW
unset NAME_SANITY
@@ -88,3 +88,39 @@
USED = __normalize($2)
USEDBYDATASET = __normalize($3)
USEDBYSNAPSHOTS = __normalize($4)
+@@ -492,6 +540,7 @@ case ${1} in
+ fi
+ fi
+ # do not change root (/) mounted boot environment mountpoint
++ HAVE_ZFSBE=0
+ if [ "${ROOTFS}" != "${POOL}/${BEDS}/${2}" ]
+ then
+ TMPMNT=$( mktemp -d -t BE-${2} )
+@@ -519,6 +568,9 @@ EOF
+ else
+ TMPMNT=${MOUNT}
+ fi
++ if [ -f ${TMPMNT}/etc/rc.d/zfsbe ]; then
++ HAVE_ZFSBE=1
++ fi
+ if [ -f /boot/zfs/zpool.cache ]
+ then
+ cp /boot/zfs/zpool.cache ${TMPMNT}/boot/zfs/zpool.cache
+@@ -555,11 +607,16 @@ EOF
+ zfs set canmount=noauto ${NAME}
+ done
+ # enable automatic mount for active boot environment and promote it
++ if [ ${HAVE_ZFSBE} -eq 1 ]; then
++ ZFSBE_CANMOUNT=noauto
++ else
++ ZFSBE_CANMOUNT=on
++ fi
+ echo "${ZFS_LIST}" \
+ | grep -E "^${POOL}/${BEDS}/${2}(/|$)" \
+ | while read NAME
+ do
+- zfs set canmount=on ${NAME}
++ zfs set canmount=${ZFSBE_CANMOUNT} ${NAME}
+ while __be_clone ${NAME}
+ do
+ zfs promote ${NAME}
Modified: head/sysutils/beadm/files/patch-beadm.1
==============================================================================
--- head/sysutils/beadm/files/patch-beadm.1 Thu Jan 18 21:08:02 2018 (r459379)
+++ head/sysutils/beadm/files/patch-beadm.1 Thu Jan 18 21:12:29 2018 (r459380)
@@ -4,11 +4,9 @@ Date: Wed Sep 6 09:17:00 2017 -0600
Fix indentation in man page
-diff --git beadm.1 beadm.1
-index a5ac900..ff97c93 100644
---- beadm.1
+--- beadm.1.orig 2017-01-13 23:25:44 UTC
+++ beadm.1
-@@ -87,9 +87,11 @@ If the -e param is specified, the new environment will be cloned from the given
+@@ -87,9 +87,11 @@ If the -e param is specified, the new environment will
Creates a snapshot of the existing boot environment named
.Ar beName .
.Pp
More information about the svn-ports-all
mailing list