Skip to content

Commit

Permalink
revert to using reboot for package layering examples
Browse files Browse the repository at this point in the history
There is a bug that causes nodes started with --apply-live
to not be able to update via zincati [1]. We can add it back
once the bug is taken care of.

[1] coreos/fedora-coreos-tracker#1691
  • Loading branch information
dustymabe committed Apr 26, 2024
1 parent 1cd056e commit 66a5c74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/ROOT/pages/os-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ However, in some cases it is necessary to add software to the base OS itself. Fo
To do this, you can use https://coreos.github.io/rpm-ostree/[`rpm-ostree install`]. Consider these packages as "extensions": they extend the functionality of the base OS rather than e.g. providing runtimes for user applications. That said, there are no restrictions on which packages one can actually install. By default, packages are downloaded from the https://docs.fedoraproject.org/en-US/quick-docs/repositories/[Fedora repositories].

To start the layering of a package, you need to write a systemd unit that executes the `rpm-ostree` command to install the wanted package(s).
By default, with `rpm-ostree install`, changes are queued for the next boot. The `-A/--apply-live` option can be used to apply changes live *and* have them persist.
Changes are applied to a new deployment and a reboot is necessary for those to take effect.

== Example: Layering vim and setting it as the default editor

Expand Down Expand Up @@ -43,8 +43,9 @@ systemd:
# if the package is already installed. This is useful if the package is
# added to the root image in a future Fedora CoreOS release as it will
# prevent the service from failing.
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive vim
ExecStart=/usr/bin/rpm-ostree install --allow-inactive vim
ExecStart=/bin/touch /var/lib/%N.stamp
ExecStart=/bin/systemctl --no-block reboot
[Install]
WantedBy=multi-user.target
Expand Down
3 changes: 2 additions & 1 deletion modules/ROOT/pages/sysconfig-enabling-wifi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ systemd:
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive NetworkManager-wifi iwlwifi-dvm-firmware
ExecStart=/usr/bin/rpm-ostree install --allow-inactive NetworkManager-wifi iwlwifi-dvm-firmware
ExecStart=/bin/touch /var/lib/%N.stamp
ExecStart=/bin/systemctl --no-block reboot
[Install]
WantedBy=multi-user.target
storage:
Expand Down

0 comments on commit 66a5c74

Please sign in to comment.