Skip to content

Commit

Permalink
alternatives: update doc to use the usual alternatives commands
Browse files Browse the repository at this point in the history
  • Loading branch information
HuijingHei committed Oct 24, 2024
1 parent 27968e3 commit 134c48f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions modules/ROOT/pages/alternatives.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,26 @@ storage:
overwrite: true
hard: false
----

== Manual setup

Starting with Fedora CoreOS based on Fedora 41, you can use `alternatives` commands to configure the default command manually.

For example, to use the legacy-based variants of the `iptables` commands:

.Example using alternatives to configure default command manually
[source,bash]
----
# The legacy priority is 10, update nft to lower priority, so legacy wins
pfx=/usr/sbin/iptables
pfx6=/usr/sbin/ip6tables
sudo alternatives --install ${pfx} iptables ${pfx}-nft 5 \
--slave ${pfx6} ip6tables ${pfx6}-nft \
--slave ${pfx}-restore iptables-restore ${pfx}-nft-restore \
--slave ${pfx}-save iptables-save ${pfx}-nft-save \
--slave ${pfx6}-restore ip6tables-restore ${pfx6}-nft-restore \
--slave ${pfx6}-save ip6tables-save ${pfx6}-nft-save
sudo alternatives --auto iptables
iptables --version
----

0 comments on commit 134c48f

Please sign in to comment.