Page MenuHomeFreeBSD

beinstall.sh: Use bectl instead of beadm by default
ClosedPublic

Authored by 0mp on Jul 30 2019, 10:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 1, 1:13 PM
Unknown Object (File)
Tue, Mar 26, 8:58 AM
Unknown Object (File)
Tue, Mar 26, 8:45 AM
Unknown Object (File)
Feb 27 2024, 11:47 PM
Unknown Object (File)
Feb 22 2024, 9:49 PM
Unknown Object (File)
Dec 20 2023, 2:16 AM
Unknown Object (File)
Dec 14 2023, 2:21 AM
Unknown Object (File)
Nov 29 2023, 11:24 AM

Details

Summary
beinstall.sh: Use bectl instead of beadm by default

This patch also introduces an environment variable BE_UTILITY, which can be
used to specify the utility to use for managing ZFS boot environments (which
can be either bectl or beadm).

While here, fix some typos in the manual page and remove beadm from section
"SEE ALSO".
Test Plan
  • Apply the patch
  • Upgrade a system with beinstall

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

A few suggestions, nothing major.

share/man/man8/beinstall.8
66 ↗(On Diff #60268)

I would leave the "a" here from the original.

89 ↗(On Diff #60268)

I'd use either "from the Ports Collection" or simply "from ports".

kevans added a subscriber: kevans.

Throwing myself on as a reviewer so I remember to circle back to this... I seem to recall that bectl might have some issue with mount (not mounting everything that might be needed for some setups, maybe?) -- I'll search through my e-mail and get back to this, though.

I second @bcr's manpages comments. Otherwise LGTM.

share/man/man8/beinstall.8
83 ↗(On Diff #60268)

It seemed like we generally used "FOO_CMD" for this kind of thing, but I might be mixing up conventions between FreeBSD and $work.

  • Improve wording (as suggested by @bcr)
0mp marked 3 inline comments as done.Aug 7 2019, 8:30 AM
0mp added inline comments.
share/man/man8/beinstall.8
66 ↗(On Diff #60268)

Done

83 ↗(On Diff #60268)

We use CONFIG_UPDATER in this script, so that's why I decided not to follow the _CMD convention from ports.

89 ↗(On Diff #60268)

Done

0mp marked 3 inline comments as done.Aug 8 2019, 2:38 PM

@kevans There is a bug report that bectl might have some problems with the activate command: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239702

FWIW, in consultation w/ @kevans, I did s/beadm/bectl/g on beinstall,sh to get myself out of a problem, and it worked without issue.

Manpage is good now. Thanks.

tools/build/beinstall.sh
163 ↗(On Diff #60534)

I would consider adding an additional seatbelt here, though this I suppose this is more of an advanced tool:

if [ "$(basename ${BE_UTILITY})" = "bectl" ]; then
        ${BE_UTILITY} check || errx "bectl sanity check failed"
fi

bectl check was added so that freebsd-update can cleanly not try boot environment stuff if the system doesn't appear to be setup for boot environments.

will added inline comments.
tools/build/beinstall.sh
163 ↗(On Diff #60534)

This seems like a good suggestion.

  • Add a check suggested by kevans.
  • Bump date in the manual
This revision is now accepted and ready to land.Oct 29 2020, 4:34 PM
This revision was automatically updated to reflect the committed changes.