Page MenuHomeFreeBSD

D21111.id60534.diff
No OneTemporary

D21111.id60534.diff

Index: share/man/man8/beinstall.8
===================================================================
--- share/man/man8/beinstall.8
+++ share/man/man8/beinstall.8
@@ -25,8 +25,8 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
-.Dd August 20, 2018
-.Dt BEINSTALL.SH 1
+.Dd August 7, 2019
+.Dt BEINSTALL.SH 8
.Os
.Sh NAME
.Nm beinstall.sh
@@ -65,10 +65,8 @@
.Nm
requires a fully built world and kernel.
It also requires
-.Xr beadm 1
-and
.Xr pkg 8 ,
-which are not present in the base system and have to be installed manually.
+which is not present in the base system and has to be installed manually.
.Pp
The
.Ar options
@@ -82,6 +80,13 @@
User modifiable variables.
Set these in the environment if desired:
.Bl -tag -width indent
+.It Ev BE_UTILITY Pq default: Dq Li "bectl"
+Utility to manage ZFS boot environments.
+This can be either
+.Xr bectl 8
+from the base system or
+.Xr beadm 1
+from ports (sysutils/beadm).
.It Ev CONFIG_UPDATER Pq default: Dq Li "etcupdate"
Config updater:
.Xr etcupdate 8
@@ -110,9 +115,9 @@
lives in the src tree.
.El
.Sh SEE ALSO
-.Xr beadm 1 ,
.Xr build 7 ,
.Xr development 7 ,
+.Xr bectl 8 ,
.Xr etcupdate 8 ,
.Xr mergemaster 8 ,
.Xr pkg 8
Index: tools/build/beinstall.sh
===================================================================
--- tools/build/beinstall.sh
+++ tools/build/beinstall.sh
@@ -30,7 +30,7 @@
# Install a boot environment using the current FreeBSD source tree.
# Requires a fully built world & kernel.
#
-# Non-base tools required: beadm, pkg
+# Non-base tools required: pkg
#
# In a sandbox for the new boot environment, this script also runs etcupdate
# and pkg upgrade automatically in the sandbox. Upon successful completion,
@@ -42,6 +42,8 @@
# beinstall [optional world/kernel flags e.g. KERNCONF]
#
## User modifiable variables - set these in the environment if desired.
+# Utility to manage ZFS boot environments.
+BE_UTILITY="${BE_UTILITY:-"bectl"}"
# If not empty, 'pkg upgrade' will be skipped.
NO_PKG_UPGRADE="${NO_PKG_UPGRADE:-""}"
# Config updater - 'etcupdate' and 'mergemaster' are supported. Set to an
@@ -96,7 +98,7 @@
if [ -n "${created_be_dirs}" ]; then
chroot ${BE_MNTPT} /bin/rm -rf ${created_be_dirs}
fi
- beadm destroy -F ${BENAME}
+ ${BE_UTILITY} destroy -F ${BENAME}
}
create_be_dirs() {
@@ -150,8 +152,8 @@
unmount_be
rmdir_be
echo "Post-mortem cleanup complete."
- echo "To destroy the BE (recommended), run: beadm destroy ${BENAME}"
- echo "To instead continue with the BE, run: beadm activate ${BENAME}"
+ echo "To destroy the BE (recommended), run: ${BE_UTILITY} destroy ${BENAME}"
+ echo "To instead continue with the BE, run: ${BE_UTILITY} activate ${BENAME}"
}
if [ -n "$BEINSTALL_CMD" ]; then
@@ -205,10 +207,10 @@
BE_MM_ROOT=${BE_TMP}/mergemaster # mergemaster will create
mkdir -p ${BE_MNTPT}
-beadm create ${BENAME} >/dev/null || errx "Unable to create BE ${BENAME}"
+${BE_UTILITY} create ${BENAME} >/dev/null || errx "Unable to create BE ${BENAME}"
[ -z "$NO_CLEANUP_BE" ] && cleanup_commands="cleanup_be ${cleanup_commands}"
-beadm mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}."
+${BE_UTILITY} mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}."
echo "Mounted ${BENAME} to ${BE_MNTPT}, performing install/update ..."
make "$@" DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!"
@@ -251,8 +253,8 @@
unmount_be || errx "Unable to unmount BE"
rmdir_be || errx "Unable to cleanup BE"
-beadm activate ${BENAME} || errx "Unable to activate BE"
+${BE_UTILITY} activate ${BENAME} || errx "Unable to activate BE"
echo
-beadm list
+${BE_UTILITY} list
echo
echo "Boot environment ${BENAME} setup complete; reboot to use it."

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 7, 4:03 PM (14 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28457219
Default Alt Text
D21111.id60534.diff (3 KB)

Event Timeline