~evilham/cdist-evilham

cdist-evilham/type/__evilham_freebsd_update/man.rst -rw-r--r-- 2.6 KiB
0d3509d9 — Evilham [__mautrix_telegram] Mark as deprecated until someone adopts it a day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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-p6


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.