cdist-type__evilham_freebsd_update(7)
=====================================
NAME
----
cdist-type__evilham_freebsd_update - Perform FreeBSD patch updates
DESCRIPTION
-----------
This (singleton) type does the rough non-interactive equivalent of:
.. code-block:: sh
# For ABI-change upgrades:
# Get and install latest patch level
freebsd-update upgrade -r TARGET_VERSION
# Reboot
shutdown -r +1s "Upgrading system from cdist"
# Try to apply final patches
freebsd-update install || true
# Force a reinstall of all packages (might be ABI-dependent)
pkg upgrade --force
# Reboot
shutdown -r +1s "Upgrading system from cdist"
#
# For patch-level-only upgrades:
# Get and install latest patch level
freebsd-update fetch install
# Reboot
shutdown -r +1s "Upgrading system from cdist"
# Try to apply final patches
freebsd-update install || true
# Reboot
shutdown -r +1s "Upgrading system from cdist"
ZFS Boot Environments
~~~~~~~~~~~~~~~~~~~~~
Support for ZFS Boot Environments will be detected and used.
Before modifying your system a Boot Environment will be created named:
`cdist-CURRENT_VERSION-PATCH_LEVEL`.
This Boot Environment will be first active, keeping the previous active Boot
Environment (the one being modified) with the boot-once flag.
That way, if something goes wrong, the system should restart into the
`cdist-CURRENT_VERSION-PATCH_LEVEL` Boot Environment, before the system upgrade.
Note about reboots
~~~~~~~~~~~~~~~~~~
Notice that this *will* ruthlessly reboot your system if and only if an update
is deemed necessary and is performed correctly.
Note on release notes
~~~~~~~~~~~~~~~~~~~~~
Also notice that you really should read the release notes and make sure you
don't brick your system :-).
It is your responsibility if an upgrade goes wrong.
OPTIONAL PARAMETERS
-------------------
target-version
The target version including the patch number.
If the current os-version, as reported by freebsd-version, does not match,
an upgrade will be attempted.
It defaults to the latest patch level as of the latest update to this type
(see `__type/parameter/default/target-version`).
EXAMPLES
--------
.. code-block:: sh
# Upgrade to this type's default (hopefully that's the latest!)
__evilham_freebsd_update
# Upgrade to a specific patch level
__evilham_freebsd_update \
--target-version 12.2-RELEASE-p3
SEE ALSO
--------
- `freebsd-update(8)`
- `freebsd-update.conf(5)`
- `__freebsd_update_command(7)`
- `__freebsd_update_conf(7)`
AUTHORS
-------
Evilham <contact@evilham.com>
COPYING
-------
Copyright \(C) 2021 Evilham.