forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CLHM helper to warn about modularity on F39 systems
- Loading branch information
1 parent
dab1689
commit d2fdce5
Showing
5 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
overlay.d/17fedora-modularity/usr/lib/systemd/system-preset/46-fcos-fedora-modularity.preset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable coreos-check-modularity.service |
10 changes: 10 additions & 0 deletions
10
overlay.d/17fedora-modularity/usr/lib/systemd/system/coreos-check-modularity.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This service is used for printing a message if | ||
# modular RPMs are being used | ||
[Unit] | ||
Description=Check if modular packages are layered | ||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/libexec/coreos-check-modularity | ||
RemainAfterExit=yes | ||
[Install] | ||
WantedBy=multi-user.target |
29 changes: 29 additions & 0 deletions
29
overlay.d/17fedora-modularity/usr/libexec/coreos-check-modularity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/bash | ||
# This script checks if the system has layered modular packages and | ||
# prints a message to the serial console. | ||
|
||
# Change the output color to yellow | ||
warn=$(echo -e '\033[0;33m') | ||
# No color | ||
nc=$(echo -e '\033[0m') | ||
|
||
# Find the number of installed modules | ||
num_modules=$(rpm-ostree status --json | jq '.deployments[0].modules | length') | ||
|
||
# If there are no modules then nothing to do here | ||
[ "$num_modules" == "0" ] && exit 0 | ||
|
||
motd_path=/run/motd.d/35_modularity_warning.motd | ||
cat << EOF > "${motd_path}" | ||
${warn} | ||
############################################################################ | ||
WARNING: This system has layered modularity RPMs. In Fedora 39 modularity | ||
has been retired. The system will most likely stop updating successfully | ||
when Fedora CoreOS transitions to Fedora 39. See this tracker for more info: | ||
https://github.com/coreos/fedora-coreos-tracker/issues/1513 | ||
To disable this warning, use: | ||
sudo systemctl disable coreos-check-modularity.service | ||
############################################################################ | ||
${nc} | ||
EOF |