FreeBSD Bugzilla – Attachment 201311 Details for
Bug 235111
add bectl support to beinstall.sh
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add bectl support and update man page
beinstall-bectl.patch (text/plain), 3.59 KB, created by
Olivier Cochard
on 2019-01-21 16:10:20 UTC
(
hide
)
Description:
patch to add bectl support and update man page
Filename:
MIME Type:
Creator:
Olivier Cochard
Created:
2019-01-21 16:10:20 UTC
Size:
3.59 KB
patch
obsolete
>Index: share/man/man8/beinstall.8 >=================================================================== >--- share/man/man8/beinstall.8 (revision 343258) >+++ share/man/man8/beinstall.8 (working copy) >@@ -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. >+.Xr pkg 8 >+which is not present in the base system and has to be installed manually. > .Pp > The > .Ar options >@@ -110,7 +108,7 @@ > lives in the src tree. > .El > .Sh SEE ALSO >-.Xr beadm 1 , >+.Xr bectl 8 , > .Xr build 7 , > .Xr development 7 , > .Xr etcupdate 8 , >Index: tools/build/beinstall.sh >=================================================================== >--- tools/build/beinstall.sh (revision 343258) >+++ tools/build/beinstall.sh (working copy) >@@ -7,7 +7,7 @@ > # modification, are permitted provided that the following conditions > # are met: > # 1. Redistributions of source code must retain the above copyright >-# notice, this list of conditions and the following disclaimer >+# notice, this list of conditions and the following disclaimer > # in this position and unchanged. > # 2. Redistributions in binary form must reproduce the above copyright > # notice, this list of conditions and the following disclaimer in the >@@ -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: beadm (if older than 12.0, uses bectl otherwise), pkg > # > # In a sandbox for the new boot environment, this script also runs etcupdate > # and pkg upgrade automatically in the sandbox. Upon successful completion, >@@ -100,7 +100,7 @@ > if [ -n "${created_be_dirs}" ]; then > chroot ${BE_MNTPT} /bin/rm -rf ${created_be_dirs} > fi >- beadm destroy -F ${BENAME} >+ ${BE_CMD} destroy -F ${BENAME} > } > > create_be_dirs() { >@@ -155,8 +155,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_CMD} destroy ${BENAME}" >+ echo "To instead continue with the BE, run: ${BE_CMD} activate ${BENAME}" > } > > if [ -n "$BEINSTALL_CMD" ]; then >@@ -175,6 +175,8 @@ > objdir=$(make -V .OBJDIR 2>/dev/null) > [ ! -d "${objdir}" ] && errx "Must have built FreeBSD from source tree" > >+BE_CMD=$(which bectl) || BE_CMD=$(which beadm) >+ > # May be a worktree, in which case .git is a file, not a directory. > if [ -e .git ] ; then > commit_time=$(git show --format='%ct' 2>/dev/null | head -1) >@@ -206,10 +208,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_CMD} 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_CMD} 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!" >@@ -252,8 +254,8 @@ > > unmount_be || errx "Unable to unmount BE" > rmdir_be || errx "Unable to cleanup BE" >-beadm activate ${BENAME} || errx "Unable to activate BE" >+${BE_CMD} activate ${BENAME} || errx "Unable to activate BE" > echo >-beadm list >+${BE_CMD} list > echo > echo "Boot environment ${BENAME} setup complete; reboot to use it."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235111
:
201310
| 201311